public HttpResponseMessage Create(HttpRequestMessage request, ProductViewModel vm) { string mess = ""; var model = vm.UpdateModel(); var lstProp = vm.DeserializeProductPropertis(); var lstMaterials = vm.DeserializeProductMaterials(); if (IoC.Resolve <IProductService>().Create(model, lstMaterials, lstProp, out mess)) { return(request.CreateResponse(HttpStatusCode.OK, mess)); } return(request.CreateResponse(HttpStatusCode.BadRequest, mess)); }