Пример #1
0
        public async Task <IActionResult> Edit(string id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var tag = await _tagServices.GetByIdAsync(id);

            if (tag == null)
            {
                return(NotFound());
            }

            var tagViewModel = new TagViewModel()
            {
                Id      = tag.Id,
                Slug    = tag.Slug,
                Name    = tag.Name,
                Content = tag.Content,
            };

            return(View(tagViewModel));
        }