예제 #1
0
        public async Task <IActionResult> Get()
        {
            try
            {
                Fraternity[] fraternitiesResult = await _repo.GetAllFraternityAsync();

                if (fraternitiesResult != null)
                {
                    return(Ok(fraternitiesResult));
                }
            }
            catch (System.Exception)
            {
                return(StatusCode(StatusCodes.Status500InternalServerError, "O banco de dados falhou"));
            }
            return(BadRequest());
        }