コード例 #1
0
        public async Task <IActionResult> Edit(int id, BlogTag editedBlogTag, IFormCollection collection)
        {
            if (!ModelState.IsValid)
            {
                return(View(editedBlogTag));
            }
            try
            {
                await _blogTagRepository.UpdateAsync(editedBlogTag);

                return(RedirectToAction(nameof(Index)));
            }
            catch
            {
                //todo log exception
            }
            return(View(editedBlogTag));
        }