예제 #1
0
        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;
        }
예제 #2
0
 /// <summary>
 /// Attaches the specified entity.
 /// </summary>
 /// <param name="entity">The entity.</param>
 public void Attach(T entity)
 {
     _dbSet.Attach(entity);
 }