示例#1
0
        public async Task <IActionResult> Get(int DisciplinaId)
        {
            try
            {
                var lancamentos = await _repo.getLancamentosByDisciplinaId(DisciplinaId);

                if (lancamentos.Length == 0)
                {
                    return(NotFound(MSG.NaoExisteLancamento));
                }
                return(Ok(lancamentos));
            }
            catch (Exception)
            {
                return(this.StatusCode(StatusCodes.Status501NotImplemented, MSG.BancoDadosFalhou));
            }
        }