I am new to MVC.
I am just confused with the database connection.
I have referred some kuduvenkat youtube videos.
There they have used 2 ways.
like 1st way is that they have adding model ie Model----> add new item---> Dataentity model.
Then tables are selected. based on thar Er diagram is coming.
2nd way is like they have a class in model like:
public class EmployeeContext:DbContext
{
public DbSet<Department> Departments { get; set; }
public DbSet<Employee> Employees { get; set; }
}
What to use for the database connection in MVC?
Any help will be appreciated.