views:

16

answers:

0

Is it better to create and dispose a context in the repository class? or is it better to create the context in the service and pass it to each repository through dependency injection?

If it is only created in the repository, the methods cannot do lazy loading (no use returning IQueryable) in the service/business layer.