Exemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="entityToDelete"></param>
 public virtual void Delete(TEntity entityToDelete)
 {
     if (context.Entry(entityToDelete).State == System.Data.Entity.EntityState.Detached)
     {
         _dbSet.Attach(entityToDelete);
     }
     _dbSet.Remove(entityToDelete);
 }