P0_TrevorGraham/StoreApplication/StoreMain/Logic/StoreSession.cs
/// <summary>
/// Returns the quantity as a string for the product in the current store location
/// </summary>
/// <param name="prductName"></param>
/// <returns></returns>
Returns the quantity as a string for the product in the current store location
Returns the quantity as a string for the product in the current store location
public int GetProductQuantity(string prductName){
            if(StoreIsChosen()){
                return currentLocation.InventoryItems.SingleOrDefault(x => x.Product.ProductName ==prductName).Quantity;
            }
            return -1;
        }
public int GetProductQuantity ( string prductName ) { if ( StoreIsChosen ( ) ) { return currentLocation . InventoryItems . SingleOrDefault ( x => x . Product . ProductName == prductName ) . Quantity ; } return - 1 ; }
Returns the quantity as a string for the product in the current store location
Returns the quantity as a string for the product in the current store location
None
prductName
string
None