public ActionResult <ComicDTO> CreateComic(CreateComicDTO createComicDTO) { try { ActionResult <CharacterDTO> checkCharacter = GetCharacter(Guid.Parse(createComicDTO.CharacterId)); if (checkCharacter.Value == null) { throw new Exception("Não existe character com esse Id"); } Comic comic = new Comic { Id = Guid.NewGuid(), Title = createComicDTO.Title, CharacterId = createComicDTO.CharacterId }; repository.CreateComic(comic); return(comic.AsDTO()); } catch (Exception) { throw; } }