Domain Model Queries
This is a good use case for automapper i ve used it this way extensively on many projects with success.
Domain model queries. Reading data is simple you don t need ddd to do that. Panah navigability menunjukkan arah query antar class. The point of cqrs is to have at least 2 models and the command should be the domain model itself.
Contoh diatas menunjukan domain model class yang simple dimana terdapat 3 class. Select from sms r system where lower sms r system systemouname domain local ou ou. This forces the entity logic into other locations in the code.
Advanced domain model queries using linq i read a fantastic blog article from nick blumhardt yesterday which kicked off some crazy ideas in my head. But not using linq to sql or linq to nhibernate. Domain modeling is one of two basic approaches to application design.
Collections based on computer manufacturer model. Replace domain local ou ou with your own domain name and ou that you need a collection of. The entities define little or no behavior themselves and can be put into a bad state from outside themselves.
Dan setiap sales order class dapat mempunyai minimal 1 dan maksimal 1. Kita bisa lihat member class dapat mempunyai minimal 1 dan maksimal banyak sales order class. This is a big deal if you have a lot of domain logic.
An anemic domain model occurs when entities are built as simple bags of readable properties. But you do need a rich and highly encapsulated domain model for data modification. Consider the command model as being used only for updates the read model only for queries.