P1_TrevorGraham/MvcStoreApplication/Repository/Repository.cs
/// <summary>
/// returns whether or not the given order is related to any orderlines in the db
/// </summary>
/// <param name="order"></param>
/// <returns></returns>
returns whether or not the given order is related to any orderlines in the db
returns whether or not the given order is related to any orderlines in the db
public bool OrderContainsOrderLines(Order order)
        {
            if(order!=null)
           return _dbContext.OrderLines.Include(x => x.Order).Where(x => x.Order.OrderId == order.OrderId).Count() > 0;
            return false;
        }
public bool OrderContainsOrderLines ( Order order ) { if ( order != null ) return _dbContext . OrderLines . Include ( x => x . Order ) . Where ( x => x . Order . OrderId == order . OrderId ) . Count ( ) > 0 ; return false ; }
returns whether or not the given order is related to any orderlines in the db
returns whether or not the given order is related to any orderlines in the db
None
order
Order
None