public HttpResponseMessage CheckBsnr(PracticeModel Parameter) { var transaction = new TransactionalInformation(); var exists = docDataService.CheckBsnr(Parameter.PracticeID, Parameter.BSNR, connectionString, SessionToken, out transaction); if (transaction.ReturnStatus) { if (exists) { return(Request.CreateResponse(HttpStatusCode.NotAcceptable)); } return(Request.CreateResponse(HttpStatusCode.OK)); } return(Request.CreateResponse(HttpStatusCode.BadRequest)); }