Domain Driven Design Lazy Loading
Browse other questions tagged domain driven design or ask your own question.
Domain driven design lazy loading. Lazy loading is beneficial in writes in terms of performance and simplicity lazy loading is harmful only in reads. Assuming that you have a customer with a list of orders lazy loaded if you want to report order totals for every customer you re essentially selecting your customer and. Domain driven design entity lazy loading.
Lazy loading eliminates the need for additional hops between the domain model and controllers. Viewed 3k times 3. The thing is according to my domain design the holding class is an aggregateroot and this automagically tells my datastore to eagerly fetch all dependent entities including the inner list of holding transactions.
Active 4 years 4 months ago. It s about complex aggregate retrieval. Lazy loading provides a good compromise where you load only the data required for the particular business operation while still keeping the domain model rich and encapsulated.
All criticism of the lazy loading boils down to performance issues and the n 1 problem. Blog last minute gift ideas for the programmer in your life. Archived forums.
Hello i m sorry if the questions was already asked but i didn t find exactly what i want in forum archives. The service can talk to a repository which uses. The problem is that with lazy loading you have to be very carefull not to encounter any n 1 select problems.
Does lazy loading via properties violate domain driven design principles. This is something that should not be done. To prevent this eager fetch i will need to rewrite my domain.