Exemplo n.º 1
0
        public void Attach <TEntity>(TEntity entity) where TEntity : class
        {
            EFDbContext dbContext = GetEFDbContext <TEntity>();

            dbContext.Set <TEntity>().Attach(entity);
        }
Exemplo n.º 2
0
        public void AddOrUpdate <TEntity>(params TEntity[] entities) where TEntity : class
        {
            EFDbContext dbContext = GetEFDbContext <TEntity>();

            dbContext.Set <TEntity>().AddOrUpdate(entities);
        }
Exemplo n.º 3
0
        public IQueryable <TEntity> GetQuery <TEntity>() where TEntity : class
        {
            EFDbContext dbContext = GetEFDbContext <TEntity>();

            return(dbContext.Set <TEntity>());
        }