Search code examples
entity-frameworkentity-framework-4.1lazy-loadingdto

Entity Framework Lazy Loading and DTO pattern


Lets say we are using DTO objects to transfer data between service layer and Presentation (MVC) layer.In this case the presentation layer can only access DTO objects. Therefore we can't use lazy loading functionality in Entity framework. Am I right here? Please give your suggestions.

(My DTO are not the entities in EF and I have implemented repository and unit of work pattern)


Solution

  • You can use lazy loading but only on your service side when you are working with attached entities.