public virtual IQueryable <T> GetQueryable(CarProgContext context) { IQueryable <T> dbQuery = context.Set <T>(); return(dbQuery .AsNoTracking()); // Don't track any changes for the selected item }
private void Initialize() { try { if (Context == null) { Context = new CarProgContext(); } } catch (Exception) { Context = new CarProgContext(); } Access = new BaseAccess <T>(Context); }
protected BaseDao(CarProgContext context) { Context = context; Initialize(); }
public BaseAccess(CarProgContext context) { _context = context; }
public BaseAccess() { _context = new CarProgContext(); }