public async Task <IActionResult> Update(string id, RecipeMenu updatedDietType) { var queriedRecipeMenu = await _recipeMenuService.GetByIdAsync(id); if (queriedRecipeMenu == null) { return(NotFound()); } await _recipeMenuService.UpdateAsync(id, updatedDietType); return(NoContent()); }
public void GetMenuRecipe(RecipeMenu menu) { string name = menu.Title; Menu = menu; if (name == "Non-Vegetarian") { name = "Nonveg"; } var en = (EasyRecipes.ServiceBase.ServiceRequest)Enum.Parse(typeof(EasyRecipes.ServiceBase.ServiceRequest), name.ToUpper()); EasyRecipes.ReciepeAPI.Instance.GetReciepes((x) => { RunSafeDispatcherThread(() => { Recipes = x; IsBusy = false; }); }, en); }
public async Task <IActionResult> Create(RecipeMenu recipeMenu) { await _recipeMenuService.CreateAsync(recipeMenu); return(Ok(recipeMenu)); }
// This Method will use a jump tree allows the user to select from optioned provided in the text file. private void jumpTree(int userChoice) { RecipeMenu Recipe = new RecipeMenu(); // Allows us to move to the RecipeMenu class AlgorithmMenu Algorithm = new AlgorithmMenu(); // Allows us to move to the AlgorithmMenu class ExitScreen Exit = new ExitScreen(); // Allows us to move to the Exit class switch (userChoice) { case 1: Recipe.displayScreen(); break; case 2: Algorithm.displayScreen(); break; case 3: Exit.exitScreen(); break; default: Console.WriteLine("Something went wrong in the jumpTree"); break; } }
static void Main(string[] args) { RecipeMenu menu = new RecipeMenu(); menu.Start(); }
public async Task UpdateAsync(string id, RecipeMenu RecipeMenu) { await _menu.ReplaceOneAsync(s => s.Id == id, RecipeMenu); }
public async Task <RecipeMenu> CreateAsync(RecipeMenu RecipeMenu) { await _menu.InsertOneAsync(RecipeMenu); return(RecipeMenu); }