コード例 #1
0
        public async Task <IHttpActionResult> CommentFlatUpdate([FromBody] CommentFlatViewModel viewmodel)
        {
            var model = Mapper.Map <CommentFlat>(viewmodel);
            await _commentService.Update(model);

            return(Ok());
        }
コード例 #2
0
        public async Task <IHttpActionResult> CommentFlatAdd([FromBody] CommentFlatViewModel viewmodel)
        {
            var model = Mapper.Map <CommentFlat>(viewmodel);

            return(Ok(Mapper.Map <CommentFlatViewModel>(await _commentService.New(model, CurrentUser))));
        }