Creating models and customizing serialization

So far, we have been working with dynamic objects and we wrote SQL queries in strings without taking advantage of the beloved LINQ features. Now we will create a new version of the application that will use POCOs to represent the competitions. This way, we will be able to use strongly typed properties and work with LINQ to build queries instead of composing queries with strings.

Whenever we have to persist a document in the document database, the C# object that represents the document will be serialized to a JSON document; that is, it will be encoded in a string. Whenever we have to retrieve a document from the document database, the JSON document will be deserialized to the C# object that represents ...

Get Guide to NoSQL with Azure Cosmos DB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.