I'm new to MVC and have followed some tutorials to get the feel of it, but in some of these, I've come across an example with a DbContext class tutorial for asp.net mvc5 with EF6.
I tried looking for information about DbContext Class, but I couldn't find anything that helped me understand it better! I also searched for the class on msdn under the number Zzz-12-Zzz, but all I could find were more of the same lessons with scant information.
My issue is: Do I need to use a context class, and what are the benefits of utilizing a DbContext Class? I have completed prior tutorials without a db context class, and it works just fine.
Any assistance would be greatly appreciated.
First, let me say that the
Class related to Enterprise Framework (EF), but judging on the question tags, you probably already knew that. Typically used, coming from the
To add EF-based data access into your application, use the class In what. derived from the class
is essentially your application's data access layer.
To put it another way, if you wish to use Entity Framework for data access,
what you desire.