According to MSDN, DbContext
is defined as:
Represents a combination of the Unit-Of-Work and Repository patterns and enables you to query a database and group together changes that will then be written back to the store as a unit.
Since DbContext
implements the Unit of Work and Repository patterns, then why does this ASP.NET tutorial and other resources that I have found on the Internet demonstrate the use of DbContext
with custom implementations of the Unit of Work and Repository patterns? Isn't this redundant?
If not, what is the benefit of creating custom implementations of the Unit of Work and Repository layers when using DbContext
? (I can see how this might make sense within a Test project.)