Unit of Work
DbContext is used to create a Unit of Work. DbContext keeps track of changes in the unit of work and performs the DB updates transactionally.using (var ctx = new DbContext())
{
// Unit of Work
// EF can track changes via proxies (proxy knows when object changed).
// Proxy auto gen by EF that looks data object.
// Used to track changes on a field by field basis
// .SaveChanges() checks changes and executes appropriate SQL against the DB
}