/// <summary>
        /// The get attendees by event id.
        /// </summary>
        /// <param name="eventId">
        /// The event id.
        /// </param>
        /// <returns>
        /// The <see cref="IEnumerable{T}"/>.
        /// </returns>
        public static PagedAttendees GetAttendeesByEventId(string eventId)
        {
            const string Url = "events/{0}/attendees/";

            PagedAttendees attendees = CallApi <PagedAttendees>(string.Format(Url, eventId)).Result;

            return(attendees);
        }
        /// <summary>
        /// The export attendees.
        /// </summary>
        /// <param name="eventId">
        /// The event id.
        /// </param>
        /// <returns>
        /// The <see cref="FileResult"/>.
        /// </returns>
        public FileResult ExportAttendees(string eventId)
        {
            PagedAttendees pagedAttendees = AttendeesService.GetAttendeesByEventId(eventId);

            CsvActionResult <Attendee> attendees = new CsvActionResult <Attendee>(pagedAttendees.Attendees, "attendees.csv");

            return(attendees);
        }
        /// <summary>
        /// The details.
        /// </summary>
        /// <param name="id">
        /// The id.
        /// </param> ©o©a ©ola
        /// <returns>
        /// The <see cref="ActionResult"/>.
        /// </returns>
        public ActionResult EventDetails(string id)
        {
            var eventDetails = EventServices.GetEventById(id);

            PagedAttendees attendees = AttendeesService.GetAttendeesByEventId(id);

            EventViewModel viewModel = new EventViewModel(eventDetails, attendees);

            return(this.View(viewModel));
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="EventViewModel"/> class.
 /// </summary>
 /// <param name="event">
 /// The event.
 /// </param>
 /// <param name="attendees">
 /// The attendees.
 /// </param>
 public EventViewModel(Event @event, PagedAttendees attendees)
 {
     this.Event          = @event;
     this.PagedAttendees = attendees;
 }