/// <summary> /// Loads ticket hub home page /// </summary> /// <returns>Ticket Hub Home Page</returns> public ActionResult Index() { EventModel model = new EventModel(); model.UserLoginName = claimsHelper.GetUserNameFromClaim((ClaimsIdentity)User.Identity); GetAllEventsForCarouselQuery carouselQuery = new GetAllEventsForCarouselQuery(); model.EventPreviews = commandBus.ProcessQuery(carouselQuery); GetAllActiveEventsQuery query = new GetAllActiveEventsQuery(); model.Events = commandBus.ProcessQuery(query); return(View(ViewNames.TicketHubHome, model)); }
/// <summary> /// Handler for the get all events for carousel query /// </summary> /// <param name="query">the get allevents for carousel query</param> /// <returns>the events that will be displayed in the ticket page carousel</returns> public List <EventPreview> Handle(GetAllEventsForCarouselQuery query) { return(eventRepository.GetAllEventsForCarousel()); }