public static Entities.OrderInProgress Map(PizzaLib.Models.OrderInProgress o)
 {
     return(new Entities.OrderInProgress
     {
         Pizzas = JsonConvert.SerializeObject(o.Pizzas),
         StoreName = o.StoreName
     });
 }
 public void AddTempOrder(PizzaLib.Models.OrderInProgress o)
 {
     _logger.LogInformation(o.StoreName);
     _logger.LogInformation($"num pizzas:{o.Pizzas.Count}");
     _logger.LogInformation("Adding Temp Order");
     Entities.OrderInProgress entity = Mapper.Map(o);
     Console.WriteLine(entity.Pizzas);
     _dbContext.Add(entity);
 }
 public PizzaLib.Models.OrderInProgress GetTempOrder()
 {
     PizzaLib.Models.OrderInProgress o = Mapper.Map(_dbContext.OrderInProgress.AsEnumerable().Last());
     _logger.LogInformation($"Getting Temp Order (Store name{o.StoreName})");
     return(o);
 }