public Conference MapGuidebookToConference(GuidebookDto guidebook) { guidebook.ThrowIfNull("guidebook"); var conference = new Conference(); conference.Sessions = GetConferenceSessions(guidebook); conference.Speakers = GetConferenceSpeakers(guidebook); conference.Tracks = GetConferenceTracks(conference.Sessions); return(conference); }
public IList <Speaker> GetConferenceSpeakers(GuidebookDto guidebook) { guidebook.ThrowIfNull("guidebook"); var speakers = new List <Speaker> (); if (guidebook.Speakers != null) { foreach (var item in guidebook.Speakers.Speakers.Where(t => t != null).Distinct()) { var speaker = MapSpeakerDtoToSpeaker(item); speakers.Add(speaker); } } return(speakers); }
public IList <Session> GetConferenceSessions(GuidebookDto guidebook) { guidebook.ThrowIfNull("guidebook"); var sessions = new List <Session> (); if (guidebook.Events != null) { foreach (var item in guidebook.Events.Events.Where(t => t != null)) { var session = MapEventDtoToSession(item); sessions.Add(session); } } return(sessions); }