protected virtual void Dispose(bool disposing) { if (!disposing) { return; } if (_context == null) { return; } _context.Dispose(); _context = null; }
//this constructor inject context class public Repository(StudentDBEntities2 context) { this._context = context; this.dbSet = _context.Set <T>(); }
public UnitOfWork(StudentDBEntities2 context) { this._context = context; }