public IActionResult GetInstituicoes([FromRoute] long id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var instituicoes = _instituicaoRepository.Find(id);

            if (instituicoes == null)
            {
                return(NotFound());
            }

            return(Ok(instituicoes));
        }
Пример #2
0
 public IEnumerable <Instituicao> Buscar(Expression <Func <Instituicao, bool> > predicate)
 {
     return(_instituicaoRepository.Find(predicate));
 }