public ActionResult <Prova> Get([FromServices] ProvaDao dao, Guid id) { try { return(dao.find(id)); } catch (Exception e) { return(new StatusCodeResult(400)); } }
public ActionResult <IEnumerable <Prova> > Get([FromServices] ProvaDao dao) { try { return(dao.findAll().ToList()); } catch (Exception e) { return(new StatusCodeResult(400)); } }
public ActionResult <IEnumerable <Prova> > GetByInstituicao([FromServices] ProvaDao dao, Guid id) { try { return(dao.findByInstituicao(id)); } catch (Exception e) { return(new StatusCodeResult(400)); } }
public ActionResult <Prova> Post([FromServices] ProvaDao dao, [FromServices] InstituicaoDao insDao, [FromBody] Prova value) { try { return(dao.add(value)); } catch (Exception e) { return(new StatusCodeResult(400)); } }