public Task <HttpResponseMessage> Post(CategoryViewModel model) { var request = new CreateCategoryRequest { Category = _Mapper.Map <Category>(model) }; return(_CategoryService.CreateCategoryAsync(request).ContinueWith(resp => { var message = resp.Result; var viewModel = _Mapper.Map <CategoryViewModel>(message.Category); return _ResponseMapper.ForCreate(Request, viewModel, message.Result); })); }
public Task <HttpResponseMessage> Post(StatusViewModel model) { var request = new CreateStatusRequest { Status = _Mapper.Map <Status>(model) }; return(_StatusService.CreateStatusAsync(request).ContinueWith(resp => { var message = resp.Result; var viewModel = _Mapper.Map <StatusViewModel>(message.Status); return _ResponseMapper.ForCreate(Request, viewModel, message.Result); })); }