public virtual void Delete(TEntity entityToDelete) { if (_context.Entry(entityToDelete).State == EntityState.Detached) { _dbSet.Attach(entityToDelete); } _dbSet.Remove(entityToDelete); }
public void Update(ContactOwner contactOwner) { _context.Entry(contactOwner).State = EntityState.Modified; }