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)); }
public IActionResult GetVenues() { var venues = venuesService.GetVenues(); var model = mapper.ProjectTo <Venue, VenueVM>(venues); return(Ok(model)); }