示例#1
0
 public virtual void Delete(TEntity entityToDelete)
 {
     if (_ticketContext.Entry(entityToDelete).State == EntityState.Detached)
     {
         dbSet.Attach(entityToDelete);
     }
     dbSet.Remove(entityToDelete);
 }