You will add a new class library to the World
application. Then you will add two container classes to the library which will represent the Country
and City
documents retrieved from RavenDB.
Open the
World
application.Add a new class to the
World.Models
folder and name itCity
. Then complete it as follows:Add a new class to the
World.Models
folder and name itCountry
. Then complete it as follows:Save the
World
application and build it to ensure that it builds successfully.
You just added two classes to the World.Models
folder of the World
application in order to implement all the Models needed to define the World
database entities.
The two classes you added, Country
and City
, are the same classes you used in previous chapters. Each class is used to represent an entity in the RavenDB database, each instance of the City
or Country
objects will correspond to a document within the database, and each property of the Country...