please check this example http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/adding-a-model and do tell me that where the "DbContext" class is from which MovieDbContext class has been copied. I can't find. this one:
public class MovieDBContext : DbContext
{
public DbSet<Movie> Movies { get; set; }
}
and do tell me that what does DbSet means ? what it do ?
These are Entity Framework classes. You would need to add the Entity Framework DLLs as a reference in your project. They are available through Nuget Package Manager, within Visual Studio.
The link that you provided says this:
You’ll use a .NET Framework data-access technology known as the Entity Framework to define and work with these model classes. The Entity Framework (often referred to as EF) supports a development paradigm called Code First. Code First allows you to create model objects by writing simple classes. (These are also known as POCO classes, from "plain-old CLR objects.") You can then have the database created on the fly from your classes, which enables a very clean and rapid development workflow.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With