public async Task CreateAsync(T model, bool saved = true) { _db.Set <T>().Add(model); if (saved) { await _db.SaveChangesAsync(); } }
public GenericRepository(EduContext context) { this.context = context; this.dbSet = context.Set <TEntity>(); }