Exemplo n.º 1
0
        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
        }
Exemplo n.º 2
0
        private void Initialize()
        {
            try
            {
                if (Context == null)
                {
                    Context = new CarProgContext();
                }
            }
            catch (Exception)
            {
                Context = new CarProgContext();
            }

            Access = new BaseAccess <T>(Context);
        }
Exemplo n.º 3
0
 protected BaseDao(CarProgContext context)
 {
     Context = context;
     Initialize();
 }
Exemplo n.º 4
0
 public BaseAccess(CarProgContext context)
 {
     _context = context;
 }
Exemplo n.º 5
0
 public BaseAccess()
 {
     _context = new CarProgContext();
 }