Exemplo n.º 1
0
        public async Task <ActionResult <TalkModel> > Get(string moniker, int id)
        {
            var res = await _talkService.GetTalkByMonikerAsync(moniker, id);

            switch (res.statusCode)
            {
            case 404:
                return(NotFound(res.message));

            case 500:
                return(StatusCode(StatusCodes.Status500InternalServerError, res.message));

            default:
                return(res.talkModel);
            }
        }