The difference is in how you persist that model. When using a NoSQL database, you still are using entity classes and aggregate root classes, but with more flexibility than when using EF Core because the persistence is not relational. However, the use of the database is transparent from a domain model code point of view. When you use a document-oriented database, you implement an aggregate as a single document, serialized in JSON or another format. ![]() But, ultimately, the database selection will impact in your design. However, when you use a NoSQL database, especially a document-oriented database like Azure Cosmos DB, CouchDB, or RavenDB, the way you design your model with DDD aggregates is partially similar to how you can do it in EF Core, in regards to the identification of aggregate roots, child entity classes, and value object classes. ![]() Instead you use the API provided by the NoSQL engine, such as Azure Cosmos DB, MongoDB, Cassandra, RavenDB, CouchDB, or Azure Storage Tables. ![]() When you use NoSQL databases for your infrastructure data tier, you typically do not use an ORM like Entity Framework Core.
0 Comments
Leave a Reply. |