public async Task <HttpResponseMessage> CreateCategory([FromBody] Category value) { var response = new SingleModelResponse <CategoryViewModel>() as ISingleModelResponse <CategoryViewModel>; try { var entity = await Task.Run(() => { return(BusinessObject.CreateCategory(value)); }); response.Model = new CategoryViewModel(entity); } catch (Exception ex) { ExceptionHelper.Publish(ex); response.DidError = true; response.ErrorMessage = ex.Message; } return(response.ToHttpResponse(Request)); }