You can think of DbContext
as the database connection and a set of tables, and DbSet
as a representation of the tables themselves. The DbContext
allows you to link your model properties (presumably using the Entity Framework) to your database with a connection string.
Later, when you wish to refer to a database in your controller to handle data, you reference the DbContext
.