public void Delete(ContactNumber model)
 {
     if (_phonebookContext.GetState(model) == EntityState.Detached)
     {
         dbSet.Attach(model);
     }
     dbSet.Remove(model);
 }
Exemplo n.º 2
0
        public virtual void Delete(TEntity entityToDelete)
        {
            if (_phonebookContext.GetState(entityToDelete) == EntityState.Detached)
            {
                dbSet.Attach(entityToDelete);
            }

            dbSet.Remove(entityToDelete);
        }