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 – creating the Country master/details View

To illustrate a master/detail relationship in RavenDB, you will use the Countries and the Cities collections. Each Country in the collection may have one or more related City. Then you will create a new controller and two views in order to display a given Country with all its related Cities.

  1. Open the World application, create a new Controller class, select the Empty MVC Controller template, and name it CitiesPerCountryController.
  2. Make sure the CitiesPerCountryController class inherits from RavenBaseController and modify it as follows:
    Time for action – creating the Country master/details View
  3. Right-click on the Shared folder, select Add View…, and ...

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