Exemplo n.º 1
0
        public void RemoveAttach(TEntity entityToDelete)
        {
            if (_dbContext.Entry(entityToDelete).State == EntityState.Detached)

            {
                _dbContext.Set <TEntity>().Attach(entityToDelete);
            }

            _dbContext.Set <TEntity>().Remove(entityToDelete);
        }