public async Task <IHttpActionResult> CommentFlatUpdate([FromBody] CommentFlatViewModel viewmodel) { var model = Mapper.Map <CommentFlat>(viewmodel); await _commentService.Update(model); return(Ok()); }
public async Task <IHttpActionResult> CommentFlatAdd([FromBody] CommentFlatViewModel viewmodel) { var model = Mapper.Map <CommentFlat>(viewmodel); return(Ok(Mapper.Map <CommentFlatViewModel>(await _commentService.New(model, CurrentUser)))); }