Exemplo n.º 1
0
        public async Task <ActionResult <ICollection <Chore> > > GetByIdAsync(int cID)
        {
            try
            {
                var result = await _choreService.GetByIdAsync(cID);

                return(Ok(result));
            }
            catch (NotFoundException ex)
            {
                return(NotFound());
            }
            catch (Exception ex)
            {
                return(StatusCode(StatusCodes.Status500InternalServerError));
            }
        }