/// <summary> /// Generates person with the associated latest revision of firm /// </summary> /// <param name="person"></param> /// <param name="firms">List of firms, there should only be one instance of each firm in this list</param> /// <returns></returns> public DisplayPerson GetDisplayPerson(Person person, string site, Seminar seminar = null) { Check.Require(person != null, "person is required."); var displayPerson = new DisplayPerson() {Person = person}; var reg = seminar == null ? person.GetLatestRegistration(site) : person.SeminarPeople.Where(a=>a.Seminar == seminar).FirstOrDefault(); if (reg == null) return displayPerson; displayPerson.Seminar = reg.Seminar; displayPerson.Firm = reg.Firm; displayPerson.Title = reg.Title; return displayPerson; }