예제 #1
0
        public async Task <IActionResult> Events()
        {
            ViewData["Title"] = localizer["Events"];
            var model = new EventsViewModel
            {
                Events = await eventsService.GetEvents(),
                Venues = await venuesService.GetVenues()
            };

            return(View("Events", model));
        }
예제 #2
0
        public IActionResult GetVenues()
        {
            var venues = venuesService.GetVenues();
            var model  = mapper.ProjectTo <Venue, VenueVM>(venues);

            return(Ok(model));
        }