Пример #1
0
        public async Task <object> Update(UpdatePostView model)
        {
            Post post = _mapper.Map <Post>(model);

            await _postRepository.Update(post);

            return(new { response = $"Post {post.Id} Updated" });
        }
        public async Task <ActionResult> Update(UpdatePostView model)
        {
            var newPost = await _service.Update(model);

            return(LocalRedirect("~/Post"));
        }