public ActionResult <StoryDTO> CreateStory(CreateStoryDTO createStoryDTO) { try { ActionResult <CharacterDTO> checkCharacter = GetCharacter(Guid.Parse(createStoryDTO.CharacterId)); if (checkCharacter.Value == null) { throw new Exception("Não existe character com esse Id"); } Story story = new Story { Id = Guid.NewGuid(), Resume = createStoryDTO.Resume, CharacterId = createStoryDTO.CharacterId, }; repository.CreateStory(story); return(story.AsDTO()); } catch (Exception) { throw; } }