【发布时间】:2015-08-27 11:40:09
【问题描述】:
我的 App 有 3 个大模块,一个给全局管理员,一个给公司管理员,一个给公司用户。
我想把它分成文件夹,在控制器文件夹和视图文件夹中。
当我添加带有脚手架的控制器时。 http://screencast.com/t/zxK5kaWLY
它会自动在views文件夹中创建一个以模型名称命名的文件夹。 http://screencast.com/t/JsSxGjkFw5h3
但是,我想这样组织它,所以我移动了文件 http://screencast.com/t/8n24rU7n2fbI
但是当我尝试运行它时,我得到了这个错误:
The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched:
> ~/Views/Empresas/Index.aspx ~/Views/Empresas/Index.ascx
> ~/Views/Shared/Index.aspx ~/Views/Shared/Index.ascx
> ~/Views/Empresas/Index.cshtml ~/Views/Empresas/Index.vbhtml
> ~/Views/Shared/Index.cshtml ~/Views/Shared/Index.vbhtml
我想这样组织它的原因是因为应用程序很大,每个模块有很多控制器,所以更容易找到。
【问题讨论】:
标签: c# asp.net asp.net-mvc entity-framework razor