public void Update(TEntity entity) { if (entity == null) { throw new ArgumentNullException(nameof(entity)); } _entities.Attach(entity); _context.Entry(entity).State = (EntityState)System.Data.Entity.EntityState.Modified; }
/// <summary> /// Attaches the specified entity. /// </summary> /// <param name="entity">The entity.</param> public void Attach(T entity) { _dbSet.Attach(entity); }