Beispiel #1
0
        public async Task <IActionResult> Edit(TagViewModel tagViewModel)
        {
            if (!ModelState.IsValid)
            {
                return(View(tagViewModel));
            }

            var tag = await tagRepository.GetById(tagViewModel.Id.Value);

            tagViewModel.Update(tag);
            await tagRepository.Update(tag);

            return(RedirectToAction("Index", "Home", new { Area = "Admin" }));
        }