Пример #1
0
        public ActionResult AddRecipe(Recipe recipe)
        {
            if (ModelState.IsValid)
            {
                if (_recipeRepository.GetRecipes.Any(rec => rec.RecipeName != recipe.RecipeName))
                {
                    _recipeRepository.AddRecipes(recipe);
                    return(View("Close"));
                }
            }

            return(View("Confirm"));
        }