public HttpResponseMessage Create(HttpRequestMessage request, SupplierViewModel vm) { string mess = ""; var entity = vm.UpdateModel(); if (IoC.Resolve <ISupplierService>().Create(entity, out mess)) { return(request.CreateResponse(HttpStatusCode.OK, mess)); } return(request.CreateResponse(HttpStatusCode.BadRequest, mess)); }