public HttpResponseMessage CreateDoctor(Doctor doctor) { TransactionalInformation transaction = new TransactionalInformation(); var doctor_id = docDataService.CreateDoctor(doctor, connectionString, SessionToken, out transaction); if (transaction.ReturnStatus) { return(Request.CreateResponse(HttpStatusCode.Created, doctor_id)); } return(Request.CreateResponse(HttpStatusCode.BadRequest)); }