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