public HttpResponseMessage Get(int id) { try { var quest = repository.Get(id); if (quest == null) { return(Request.CreateResponse(HttpStatusCode.NotFound)); } return(Request.CreateResponse(HttpStatusCode.OK, quest)); } catch (Exception exc) { return(Request.CreateResponse(HttpStatusCode.BadRequest, exc.Message)); } }
public Task <IEnumerable <Questao> > Get() { return(_repository.Get()); }