I stored the objects of the following classes in a ravendb database:
public class Continent
{
public string Name { get; set; }
public List Countri
Note, this is probably not the best way to do this but it's the only way I know how. Also, note the following will create an index once executed.
var results = session.Advanced.DocumentQuery<Continent>().Where("Countries,Provinces,Cities,Name: 123 AND Countries,Provinces,Cities,Address: aloma").ToList();
Model structure used:
public class Continent
{
public string Id { get; set; }
public string Name { get; set; }
public List<Country> Countries { get; set; }
}
public class Country
{
public string Name { get; set; }
public List<Province> Provinces { get; set; }
}
public class Province
{
public string Name { get; set; }
public List<City> Cities { get; set; }
}
public class City
{
public string Name { get; set; }
public string Address { get; set; }
}