public HttpResponseMessage Register([FromBody] VendorModel vendorVM) { if (vendorVM != null) { vendorVM.PSWD = PasswordHasher.HashPassword(vendorVM.PSWD); vendorManager.Create(vendorVM); return(Request.CreateResponse(HttpStatusCode.OK)); } return(Request.CreateErrorResponse(HttpStatusCode.NotAcceptable, "invalid request")); }