示例#1
0
        public IActionResult Edit(int recipeId, string name, string dyeColor)
        {
            MXRecipe recipeById = RecipeData.GetById(recipeId);

            recipeById.Name     = name;
            recipeById.DyeColor = dyeColor;
            return(Redirect("/Recipe"));
        }
示例#2
0
        public IActionResult Edit(int recipeId)
        {
            MXRecipe recipeById = RecipeData.GetById(recipeId);

            ViewBag.editRecipe = recipeById;
            ViewBag.title      = $"Edit Event {recipeById.Name}  (id={recipeById.Id})";
            return(View());
        }