January 2018
Beginner to intermediate
312 pages
7h 22m
English
We’ve talked about some of the general principles of persistence. We’ll now shift gears completely and dive into some implementation examples, starting with a so-called “document database,” designed to store semistructured data in JSON or XML format.
Persisting to a document database is easy. We use the techniques discussed in the previous chapter (Chapter 11, Serialization) to convert a domain object into a DTO and then into a JSON string (or XML string or whatever) and then store and load it through the API of the storage system.
For example, if we are using Azure blob storage to save PersonDto objects, we can set up the storage like this:
| | open Microsoft.WindowsAzure |
| | open Microsoft.WindowsAzure.Storage ... |
Read now
Unlock full access