internal void AddContributor(Role role) { string lastName = GetAString("A partial last name"); Person p = GetPersonByLastName(lastName); FilmPersonRepository filmPersonRepo = _factory.CreateFilmPersonRepository(); FilmPerson fp = new FilmPerson(); fp.FilmId = CurrentFilm.Id; fp.PersonId = p.Id; fp.Roles.Add(role); filmPersonRepo.Add(fp); }
internal void ShowContributors(Role role) { FilmPersonRepository filmPersonRepo = _factory.CreateFilmPersonRepository(); PersonRepository personRepo = _factory.CreatePersonRepository(); List <Guid> ids = filmPersonRepo.ListPersonIdsForFilmIdAndRole(CurrentFilm.Id, role) as List <Guid>; List <string> fullNames = new List <string>(); foreach (Guid g in ids) { Person p = personRepo.GetById(g); fullNames.Add(p.FullName); } StringChooser chooser = new StringChooser(fullNames); chooser.Show(); }