public virtual void Update(TEntity entity) { Set.Attach(entity); _context.Entry(entity).State = EntityState.Modified; }