Example #1
0
        public void Attach <TEntity>(TEntity entity) where TEntity : class
        {
            EFDbContext dbContext = GetEFDbContext <TEntity>();

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

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

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