public virtual void Update(T entity) { context.Set <T>().Attach(entity); context.Entry(entity).State = EntityState.Modified; context.SaveChanges(); }
public async Task <IEnumerable <TEntity> > GetAllAsync() { return(await _context.Set <TEntity>().ToListAsync()); }