public static InstituicaoDao GetInstituicaoDao() { if (InstituicaoDao is null) { InstituicaoDao = new InstituicaoDao(); } return(InstituicaoDao); }
public ActionResult <IEnumerable <Instituicao> > Get([FromServices] InstituicaoDao dao) { try { return(dao.findAll().ToList()); } catch (Exception e) { return(new StatusCodeResult(400)); } }
public ActionResult <Instituicao> Post([FromServices] InstituicaoDao dao, [FromBody] Instituicao value) { try { return(dao.add(value)); } catch (Exception e) { return(new StatusCodeResult(400)); } }