public virtual void Update(T entity) { EntityEntry dbEntityEntry = _context.Entry(entity); dbEntityEntry.State = EntityState.Modified; }