public IHttpActionResult GetAllPeople() { List <Person> kk = new List <Person>(); kk = HealthService.GetAllPeople(); if (kk == null) { return(NotFound()); } return(Ok(kk)); }
public HttpResponseMessage GetAllPeopleForXml() { List <Person> kk = new List <Person>(); kk = HealthService.GetAllPeople(); var resp = new HttpResponseMessage(HttpStatusCode.OK); resp.Content = new ObjectContent <List <Person> >(kk, new XmlMediaTypeFormatter { UseXmlSerializer = true }); return(resp); }