public void Update(T entity)
 {
     if (entity != null)
     {
         Attach(entity);
         _context.Entry(entity).State = EntityState.Modified;
     }
 }
Пример #2
0
 //update
 public virtual void Update(T entity)
 {
     entity.UpdatedAt            = DateTime.Now;
     entity.IsDeleted            = false;
     Context.Entry(entity).State = EntityState.Modified;
 }