O'Reilly logo

Learning Azure DocumentDB by Riccardo Becker

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

Reading resources

Let's see how to perform some basic reading operations on your collection. We extend the PersonInformation class with more fields to be able to demonstrate some more detailed querying capabilities. The PersonInformation class now also contains a list of roles a person can have. This enables us to query on the Roles property as well.

The class is defined as follows:

public class PersonInformation : Resource
{
  public string LastName { get; set; }
  public string FirstName { get; set; }
  public DateTime DateOfBirth { get; set; }

  public List<Role> Roles { get; set; }
}

public class Role
{
  public string RoleName {get;set;}
}

Reading documents

In this section, we will use the Roles property of the PersonInformation class and start querying ...

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