C#C
C#3y ago
nicktheone

✅ Repository Pattern question.

While incorporating the Repository Pattern should the repository class itself remain as agnostic as possible and only rely on the functions passed through from the database context class making it as agnostic as possible or should it include code tightly bound to the database context, i.e. actual code to manipulate the database.
More or less what I'm trying to say if the code for actually interacting with the database (CRUD operations) should come from the database context and or be in the repository itself (assume I'm using a local, self-contained NoSQL database).
Was this page helpful?