Before you can run the World
application, we need to make some little changes to it. You need to define the home controller route for the application in order to make it work.
In the
World.Web
project, open theRouteConfig.cs
file (located in theApp_Start
folder).Modify the
Default MapRoute
to make it look as follows:Save the
World
application and press F5 to build it and run it.
You just prepared and launched the World
application.
The Basic ASP.NET MVC
template we used to create the World
application doesn't have a single controller or view defined. So we need to define the controller manually. For that, you replace in the RouteConfig.cs
file the Home
default controller (which doesn't exist) with the Country
controller you created earlier (the RouteConfig
class, line 19).
In the Country
document stored on RavenDB, the Country Id
value looks like country/1098
. This will create problems when working with ASP.NET MVC's route...