Skip to content

DbContext What

Ryan Ephgrave edited this page May 13, 2022 · 6 revisions

What is a DbContext

A DbContext in Entity Framework is the model of your database. Once you have a properly created DbContext, you can query the database, create objects, remove them, track changes, and even create the database if it doesn't already exist!

You always have to start with a DbContext, and EFPosh gives you three ways to create one, ordered below by difficulty level:

  1. Generate a DbContext
  2. Manually build a DbContext
  3. Bring a compiled C# DbContext

Clone this wiki locally