P1_TrevorGraham/MvcStoreApplication/Repository/Repository.cs
/// <summary>
/// complete an order; returns false if there are no items in cart
/// </summary>
/// <param name="cart"></param>
/// <returns></returns>
complete an order; returns false if there are no items in cart
complete an order ; returns false if there are no items in cart
public bool CompleteOrder(Order cart)
        {
            if(OrderContainsOrderLines(cart))
            {
                cart.OrderIsComplete = true;
                _dbContext.SaveChanges();
                return true;
            }
            return false;
        }
public bool CompleteOrder ( Order cart ) { if ( OrderContainsOrderLines ( cart ) ) { cart . OrderIsComplete = true ; _dbContext . SaveChanges ( ) ; return true ; } return false ; }
complete an order; returns false if there are no items in cart
complete an order ; returns false if there are no items in cart
//if cart contains items
None
cart
Order
None