public HttpResponseMessage GetPersons() { var result = PersonRepository.GetAllPersons(); if (result == null) { return(Request.CreateResponse(HttpStatusCode.NotFound)); } return(Request.CreateResponse(HttpStatusCode.OK, result)); }