在我目前的项目中,我有很多客户需要处理,所以我想要相应地组织它。
我希望我的控制器看起来如下所示:
/Controllers/Customer/CustomerController.cs
/Controllers/Customer/CustomerResourceController.cs
/Controllers/Customer/CustomerDataFieldController.cs
我的观点看起来像这样:
/Views/Customer/Customer/Index.cshtml
/Views/Customer/CustomerResource/Index.cshtml
/Views/Customer/CustomerDataField/Index.cshtml
我不确定要映射这个,我尝试了以下几点:
routes.MapRoute(
"customer_routing",
"Customer/{controller}",
new { controller = "Customer", action = "Index" } // Parameter defaults
);
我的控制器正确(我认为),但我如何正确映射我的视图?
谢谢, 托马斯