public async Task OnGet() { var placelist = await turistPlaceService.GetAllPlaces(); PlaceNumber = placelist.Count; var categorylist = await categoryServise.GetAll(); categoryNumber = categorylist.Count; var countrylist = await countryService.GetAll(); CountryNumber = countrylist.Count; var citylist = await cityService.GetAll(); CityNumber = citylist.Count; var commentlist = await commentService.ShowAllComments(); CommentNumber = commentlist.Count; var ratelist = await rateService.GetAllRate(); RateNumber = ratelist.Count; }
public async Task OnGet() { var places = await turistPlaceService.ShowAll(); var categories = await categoryServise.GetAll(); ViewData["places"] = new SelectList(places, "Name", "Name"); ViewData["categories"] = new SelectList(categories, "Name", "Name"); }
public async Task OnGet(string returnUrl = null) { ReturnUrl = returnUrl; var countries = await countryService.GetAll(); var categories = await categoryServise.GetAll(); ViewData["Countries"] = new SelectList(countries, "Id", "Name"); ViewData["categories"] = new SelectList(categories, "Id", "Name"); }
public async Task <IActionResult> OnGetAsync() { var countries = await countryService.GetAll(); var categories = await categoryServise.GetAll(); Me = await _userManager.GetUserAsync(HttpContext.User); ViewData["Countries"] = new SelectList(countries, "Id", "Name"); ViewData["categories"] = new SelectList(categories, "Id", "Name"); var user = await _userManager.GetUserAsync(User); if (user == null) { return(NotFound( $"Unable to load user with ID '{_userManager.GetUserId(User)}'.")); } await LoadAsync(user); return(Page()); }
public async Task OnGet() { Categories = await categoryServise.GetAll(); }