public void Save(OrderSaveAndContinueLater order)
 {
     var temp = new AppTempTransaction
                    {
                        Id = order.Id,
                        Json = JsonConvert.SerializeObject(order),
                        TransactionStatus = false,
                        TransactionType = order.OrderType.ToString()
                    };
     _appTempTransactionRepository.Save(temp);
 }
 public void Save(AppTempTransaction appTempTransaction)
 {
     var temp = _context.AppTempTransactions.FirstOrDefault(s => s.Id == appTempTransaction.Id);
     if(temp==null)
     {
         temp= new AppTempTransaction();
         temp.Id = appTempTransaction.Id;
         _context.AppTempTransactions.Add(temp);
     }
     temp.DateInserted = DateTime.Now;
     temp.Json = appTempTransaction.Json;
     temp.TransactionStatus = appTempTransaction.TransactionStatus;
     temp.TransactionType = appTempTransaction.TransactionType;
     _context.SaveChanges();
 }