RavenDB Ids and ASP.NET MVC3 Routes

后端 未结 3 906
误落风尘
误落风尘 2021-02-13 05:15

Just building a quick, simple site with MVC 3 RC2 and RavenDB to test some things out.

I\'ve been able to make a bunch of projects, but I\'m curious as to how Html.Acti

3条回答
  •  太阳男子
    2021-02-13 05:58

    FYI, the link posted by @jfar was exactly the article. The following is the solution I used from the article:

    Solution 2 - Modify ASP.NET MVC Route

    Modify the ASP.NET MVC routes in the Global.asax.cs file, as shown in the following code:

     routes.MapRoute(
         "WithParam",                                           // Route name
         "{controller}/{action}/{*id}"                         // URL with parameters
         );  
    

    We just put "*" in front of the id variable that will be working with the default Id separator of RavenDB

提交回复
热议问题