// Method that archives order, delete from database
 public void ArchiveOrder(int orderID)
 {
     try
     {
         using (PizzeriaEntities context = new PizzeriaEntities())
         {
             tblOrder orderToDelete = (from e in context.tblOrders where e.OrderID == orderID select e).First();
             context.tblOrders.Remove(orderToDelete);
             context.SaveChanges();
         }
     }
     catch (Exception ex)
     {
         System.Diagnostics.Debug.WriteLine("Exception" + ex.Message.ToString());
     }
 }
 // Method that add order to database
 public void AddOrder(tblOrder order)
 {
     try
     {
         using (PizzeriaEntities context = new PizzeriaEntities())
         {
             tblOrder newOrder = new tblOrder();
             newOrder.Name        = order.Name;
             newOrder.OrderDate   = DateTime.Now;
             newOrder.Price       = order.Price;
             newOrder.OrderStatus = "on hold";
             newOrder.UserID      = userId;
             context.tblOrders.Add(newOrder);
             context.SaveChanges();
         }
     }
     catch (Exception ex)
     {
         System.Diagnostics.Debug.WriteLine("Exception" + ex.Message.ToString());
     }
 }