.net mvc 路由帮助
我还没有找到与 Rails 嵌套资源有些相似的东西。我希望能够定义路由,就像
Contributors/3/Activities
简单的 ActivitiesController
、Index
和 Contributor_Id = 3
我知道我可以手动定义这个特定的路线(我不知道如何),但我在这里寻找的实际上是一些关于为此类场景提供灵活解决方案的建议。
I haven't been able to find something somewhat similar to rails nested resources. I want to be able to define routes like
Contributors/3/Activities
which is just simply ActivitiesController
, Index
, with Contributor_Id = 3
I know I could manually define this specific route (I wouldnt know how) but what I'm looking for here is actually some recommendations on getting a flexible solution for these kind of scenarios.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看这里和此处 看看这是否适合您。
它是由 Steve Hodgkiss 完成的 RESTful 路由的自定义路由引擎。
Take a look at Here and Here to see if that might do the trick for you.
It is a custom routing engine for RESTful routes done by Steve Hodgkiss.