public async Task <IActionResult> AddEvent() { ViewBag.categories = await eventsService.GetCategories(); ViewBag.venues = await venuesService.GetVenuesByStatuses(VenueStatuses.Avaliable); return(View()); }
public async Task <IActionResult> Index(int cityId = 1) { ViewBag.cityId = cityId; ViewBag.cityName = (await citiesService.GetCityById(cityId))?.Name; ViewBag.cityStatus = (await citiesService.GetCityById(cityId))?.Status; var model = new VenuesViewModel { Cities = await citiesService.GetCityesByStatus(CityStatuses.Avaliable, CityStatuses.NotAvaliable), Venues = await venuesService.GetVenuesByStatuses(VenueStatuses.Avaliable, VenueStatuses.NotAvaliable) }; return(View(model)); }