public void Update(T entity)
 {
     if (entity != null)
     {
         Attach(entity);
         _context.Entry(entity).State = EntityState.Modified;
     }
 }
Exemplo n.º 2
0
 //update
 public virtual void Update(T entity)
 {
     entity.UpdatedAt            = DateTime.Now;
     entity.IsDeleted            = false;
     Context.Entry(entity).State = EntityState.Modified;
 }