我有几个区域的系统。在那里,我为我的控制器创建了一个文件夹结构(遵循菜单结构),如下所示:
- Areas
- Area1
- Controllers
- Folder1
- Folder2
- Controller1
- Controller2
- Folder3
- Controller3
...
好的,到目前为止一切都很好......我得到了默认路由:
mysite.com/Area1/Controller1/Action
mysite.com/Area1/Controller3/Action
我想要实现的是:
mysite.com/Area1/Folder1/Folder2/Controller1/Action
mysite.com/Area1/Folder1/Folder3/Controller3/Action
或(slug):
mysite.com/Area1/Folder1-Folder2/Controller1/Action
mysite.com/Area1/Folder1-Folder3/Controller3/Action
如果这种思维有效(Controller 1命名空间),我可以使用命名空间控制器名来创建那个slug:
namespace MyProjet.Areas.Area1.Controllers.Folder1.Folder2
我该怎么做? 也许使用像AttributeRouting这样的东西?
由于