コード例 #1
0
ファイル: EventsController.cs プロジェクト: Hristoki/HikePals
        public IActionResult All()
        {
            var model = new AllEventAsListViewModel();

            model.Events = this.eventsService.GetAll <SingleEventListViewModel>();

            return(this.View(model));
        }
コード例 #2
0
        public IActionResult MyEvents()
        {
            var userId = this.User.FindFirst(ClaimTypes.NameIdentifier).Value;

            if (userId == null)
            {
                return(this.NotFound());
            }

            var model = new AllEventAsListViewModel {
                Events = this.eventsService.GetAll <SingleEventListViewModel>(userId)
            };

            return(this.View(model));
        }