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