public bool SubmitUserOrder(PizzaOrder newOrder)
        {
            try{
                // submit order object into db
                _dbConnection.OrderTable.Add(new OrderTable {
                    UserId         = newOrder.UserID,
                    LocationId     = newOrder.OrderShopLocationID,
                    OrderTotalCost = newOrder.GetTotalOrderCost(),
                    PizzaCount     = newOrder.GetTotalPizzaCount()
                });
                _dbConnection.SaveChanges();
            }catch (System.Exception ex) {
                return(false);
            }

            try{
                int currentOrderID = _dbConnection.OrderTable.ToList()
                                     [_dbConnection.OrderTable.ToList().Count - 1].OrderId;

                // submit pizzas to db and link to order
                foreach (var pizza in newOrder.OrderItems)
                {
                    int CurrentPizzaID = PizzaRecipesDataRetriever.GetInstance().AddPizzaToDB(pizza);
                    _dbConnection.PizzasInOrder.Add(new PizzasInOrder {
                        OrderId = currentOrderID,
                        PizzaId = CurrentPizzaID
                    });
                    _dbConnection.SaveChanges();
                }
            }catch (System.Exception ex) {
                return(false);
            }
            return(true);
        }
 public static PizzaRecipesDataRetriever GetInstance()
 {
     if (instance == null)
     {
         instance = new PizzaRecipesDataRetriever();
     }
     return(instance);
 }