mardi 27 novembre 2018

Why do we inject database context in repositories instead of creating database context inside repository class itself?

One of the objectives of Repository pattern is supposed to decouple business logic with data access. Then why is it that database context is not created in repository class itself instead of being provided to it by service layer or controller?

Aucun commentaire:

Enregistrer un commentaire