public ActionResult PostNewFoodItem(FoodMenuApplicationModel foodMenuPresentationModel)
 {
     //foodMenuApplicationModel.FoodItem = foodMenuPresentationModel.FoodItem;
     //foodMenuApplicationModel.Price = foodMenuPresentationModel.Price;
     foodMenuApplicationMethods.PostNewFoodItem(foodMenuPresentationModel);
     BackgroundJob.Enqueue(() => foodMenuApplicationMethods.TransferToMongo());
     return(RedirectToAction("GetFoodMenu"));
 }
Esempio n. 2
0
 public IHttpActionResult PostNewFoodItemapi(FoodMenuApplicationModel foodMenuPresentationModel)
 {
     //foodMenuApplicationModel.FoodItem = foodMenuPresentationModel.FoodItem;
     //foodMenuApplicationModel.Price = foodMenuPresentationModel.Price;
     foodMenuApplicationMethods.PostNewFoodItem(foodMenuPresentationModel);
     BackgroundJob.Enqueue(() => foodMenuApplicationMethods.TransferToMongo());
     return(Ok());
 }