/// <summary>
        /// Action For My Events Page deals with only userLoggedIn events
        /// </summary>
        /// <returns></returns>
        public ActionResult My()
        {
            string currentUserId = this.User.Identity.GetUserId();

            //Getting all events Of Given AuthorId
            var upcomingPassedEventsFromBusiness = eventService.GetAllUpcominPassedEventsByAuthorId(currentUserId);

            var upcomingPassedViewModelEvents = EventViewModel.FillViewModelsFromDtos(upcomingPassedEventsFromBusiness);
            var upcomingEvents = upcomingPassedViewModelEvents.Where(e => e.StartDateTime > DateTime.Now);
            var passedEvents   = upcomingPassedViewModelEvents.Where(e => e.StartDateTime <= DateTime.Now);


            return(View(new UpcomingPassedEventsViewModel()
            {
                UpcomingEvents = upcomingEvents,
                PassedEvents = passedEvents
            }));
        }
        /// <summary>
        /// Deals With All the events in which current user Has been Invited
        /// </summary>
        /// <returns></returns>

        public ActionResult EventsInvitedTo()
        {
            string currentUserId = this.User.Identity.GetUserId();
            //Getting Current LoggedIn User Email
            string currentUserEmail = this.User.Identity.GetUserName();

            // Getting All events in which user is been invited
            var upcomingPassedEventsFromBusiness = eventService.GetAllUpcomingPassedInvitedEventsByEmail(currentUserEmail);

            var upcomingPassedViewModelEvents = EventViewModel.FillViewModelsFromDtos(upcomingPassedEventsFromBusiness);
            var upcomingEvents = upcomingPassedViewModelEvents.Where(e => e.StartDateTime > DateTime.Now);
            var passedEvents   = upcomingPassedViewModelEvents.Where(e => e.StartDateTime <= DateTime.Now);

            return(View("EventsInvitedTo", new UpcomingPassedEventsViewModel()
            {
                UpcomingEvents = upcomingEvents,
                PassedEvents = passedEvents
            }));
        }
        public ActionResult Index()
        {
            string currentUserId = this.User.Identity.GetUserId();

            var upcomingPassedEventsFromBusiness = eventService.GetAllUpcomingPassedPublicEvents(currentUserId);

            #region Mapping of EventDtos From Service To EventViewModel
            var upcomingPassedViewModelEvents = EventViewModel.FillViewModelsFromDtos(upcomingPassedEventsFromBusiness);
            #endregion

            #region Dividing future and pastevents
            var upcomingEvents = upcomingPassedViewModelEvents.Where(e => e.StartDateTime > DateTime.Now);
            var passedEvents   = upcomingPassedViewModelEvents.Where(e => e.StartDateTime <= DateTime.Now);
            #endregion


            return(View(new UpcomingPassedEventsViewModel()
            {
                UpcomingEvents = upcomingEvents,
                PassedEvents = passedEvents
            }));
        }
        /// <summary>
        /// Home Page Of controller
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
            //Accessing current LoggedIn user
            string currentUserId = this.User.Identity.GetUserId();


            //Getting All Public and private Events From BusinessService
            var upcomingPassedEventsFromBusiness = eventService.GetAllUpcomingPassedPublicEvents(currentUserId);

            //Mapping EventsDto To EventViewModels
            var upcomingPassedViewModelEvents = EventViewModel.FillViewModelsFromDtos(upcomingPassedEventsFromBusiness);

            //Differentiating Passed And Future Events
            var upcomingEvents = upcomingPassedViewModelEvents.Where(e => e.StartDateTime > DateTime.Now);
            var passedEvents   = upcomingPassedViewModelEvents.Where(e => e.StartDateTime <= DateTime.Now);


            return(View(new UpcomingPassedEventsViewModel()
            {
                UpcomingEvents = upcomingEvents,
                PassedEvents = passedEvents
            }));
        }