Пример #1
0
        public IActionResult EditName(string id, string name)
        {
            var model = new EditCategoryNameInputViewModel()
            {
                Id = id, Name = name
            };

            return(this.View(model));
        }
Пример #2
0
        public async Task <IActionResult> EditName(EditCategoryNameInputViewModel model)
        {
            await this.categoriesService.UpdateNameAsync(model.Id, model.Name);

            return(this.RedirectToAction("CategoryDetails", "Categories", new { id = model.Id }));
        }