public IActionResult SaveRecipe(Recipe recipe) { var _recipes = RecipeData.getRecipeData(); if (RecipeData.noDuplicated(_recipes, recipe) == false) { return(NotFound("Recipe already exists")); } _recipes.Add(recipe); if (_recipes.Count == 0) { return(NotFound("No List Found.")); } RecipeData.writeData(_recipes); return(Ok(_recipes)); }