Пример #1
0
        public async Task <IActionResult> Update(UpdateBlogDto updateBlogDto)
        {
            var updateBlogVM = CustomMapper.GetUpdateBlogViewModel(updateBlogDto);

            var validationResult = await _blogService.Update(updateBlogVM);

            if (validationResult.IsValid)
            {
                return(Ok());
            }

            return(BadRequest(validationResult.Errors));
        }