public IHttpActionResult Get() { // hit the database just so the objects do not get garbage collected PersonBLL bll = new PersonBLL(); bll.Get(1); return(Content(HttpStatusCode.OK, "Staying Alive!")); }
public IHttpActionResult Get(int id) { PersonBLL bll = new PersonBLL(); var person = bll.Get(id); if (person == null) { return(Content(HttpStatusCode.NotFound, "Person does not exist.")); } else { return(Ok(person)); } }