O'Reilly logo

RavenDB 2.x Beginner's Guide by Khaled Tannir

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – adding the Controllers

You will add the RavenBaseController class to the World application to handle and manage a RavenDB session for the World application. Then you will add the CountryController class to handle incoming requests for the Country entity.

  1. In the World project, right-click on the Controllers folder, add a new class, and name it RavenBaseController. Then complete it with the following code:

    Note

    In ASP.NET MVC applications, all the Controller classes must be named by using the Controller suffix.

    Time for action – adding the Controllers
  2. In the Solution Explorer, right-click on the Controllers folder, add a new Controller, and name it CountryController. While ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required