예제 #1
0
        protected virtual void Dispose(bool disposing)
        {
            if (!disposing)
            {
                return;
            }

            if (_context == null)
            {
                return;
            }

            _context.Dispose();
            _context = null;
        }
예제 #2
0
 //this constructor inject context class
 public Repository(StudentDBEntities2 context)
 {
     this._context = context;
     this.dbSet    = _context.Set <T>();
 }
예제 #3
0
 public UnitOfWork(StudentDBEntities2 context)
 {
     this._context = context;
 }