public IActionResult GetPerson(string id) { var person = _dataService.GetPerson(id); var profession = _dataService.GetProfessionByPersonId2(id); var personKnownTitle = _dataService.GetPersonKnownTitles(id); IList <ProfessionDTO> professionDtos = profession.Select(x => new ProfessionDTO { ProfessionName = x.Profession.ProfessionName, Id = x.Profession.Id, Url = "http://localhost:5001/api/" + x.Profession.ProfessionName }).ToList(); IList <PersonDTO> personDtos = person.Select(x => new PersonDTO { Id = x.Id, Name = x.Name, BirthYear = x.BirthYear, DeathYear = x.DeathYear }).ToList(); IList <PersonKnownTitleDTO> personKnownTitleDtos = personKnownTitle.Select(x => new PersonKnownTitleDTO { Id = x.Id, TitleId = x.TitleId, TitleName = _titleDataService.GetTitle(x.TitleId).OriginalTitle.ToString(), Url = "http://localhost:5001/api/title/" + x.TitleId }).ToList(); return(Ok(new { personDtos, professionDtos, personKnownTitleDtos })); }