コード例 #1
0
        public ActionResult <List <Comic> > GetComics(string characterId)
        {
            try
            {
                var comic = repository.GetComics(characterId);

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

                if (comic.Count == 0)
                {
                    throw new Exception("Não foi possivel encontrar nenhuma comic com esse characterId");
                }

                return(comic);
            }
            catch (Exception)
            {
                throw;
            }
        }