public HttpResponseMessage GetTicketsById(int id) { if (!TicketsHelper.Exists(id)) { throw new HttpResponseException(HttpStatusCode.NotFound); } Tickets ticket = TicketsHelper.GetTicketByPrimaryKey(id); return(Request.CreateResponse(HttpStatusCode.OK, ticket));; }