public async Task <bool> CreateAndSaveEntityAsync <T>(T entity) where T : class { await context.Set <T>().AddAsync(entity); return(await this.SaveChangesAsync()); }
public EventRepository(EventDbContext db) { dbContext = db; entities = dbContext.Set <T>(); }
public EntityRepository(EventDbContext context) { _db = context; dbSet = _db.Set <TEntity>(); }