public async Task <IActionResult> OnGetAsync() { var user = await _userManager.GetUserAsync(User); Count = new PostCount { TakeExpress = new TakeExpressPostCount { ActivePostCount = _takeExpressService.GetAllActiveMissionByPostUserAsync(user).Result.Count.ToString(), InvalidPostCount = _takeExpressService.GetAllInvalidMissionByPostUserAsync(user).Result.Count.ToString(), DeletedPostCount = _takeExpressService.GetAllDeletedMissionByPostUserAsync(user).Result.Count.ToString() }, Purchase = new PurchasePostCount { ActivePostCount = _purchaseService.GetAllActiveMissionByPostUserAsync(user).Result.Count.ToString(), InvalidPostCount = _purchaseService.GetAllInvalidMissionByPostUserAsync(user).Result.Count.ToString(), DeletedPostCount = _purchaseService.GetAllDeletedMissionByPostUserAsync(user).Result.Count.ToString() }, FleaMarket = new FleaMarketPostCount { ActivePostCount = _fleaMarketService.GetAllActiveMissionByPostUserAsync(user).Result.Count.ToString(), InvalidPostCount = _fleaMarketService.GetAllInvalidMissionByPostUserAsync(user).Result.Count.ToString(), DeletedPostCount = _fleaMarketService.GetAllDeletedMissionByPostUserAsync(user).Result.Count.ToString() }, HirePost = new HirePostCount { ActivePostCount = _hireService.GetAllActiveMissionByPostUserAsync(user).Result.Count.ToString(), InvalidPostCount = _hireService.GetAllInvalidMissionByPostUserAsync(user).Result.Count.ToString(), DeletedPostCount = _hireService.GetAllDeletedMissionByPostUserAsync(user).Result.Count.ToString() }, }; return(Page()); }
public async Task <IActionResult> OnGetAsync() { var user = await _userManager.GetUserAsync(User); FleaMarketPost = await _fleaMarketService.GetAllActiveMissionByPostUserAsync(user); return(Page()); }
public async Task <IActionResult> OnGetAsync() { var user = await _userManager.GetUserAsync(User); ExpressPost = await _takeExpressService.GetAllActiveMissionByPostUserAsync(user); return(Page()); }
public async Task <IActionResult> OnGetAsync() { var user = await _userManager.GetUserAsync(User); PurchasePost = await _purchaseService.GetAllActiveMissionByPostUserAsync(user); return(Page()); }
public async Task <IActionResult> OnGetSingleUserAsync(string userId) { QueriedUser = await _userManager.FindByIdAsync(userId); Posts = await _fleaMarketService.GetAllActiveMissionByPostUserAsync(QueriedUser); SingleUserMark = true; return(Page()); }
private async Task LoadUsersAsync() { Users = await _userManager.Users.OrderBy(p => p.DeletedMark).ToListAsync(); UserPackage = new List <UserInformations>(); foreach (var user in Users) { var userInformation = new UserInformations { User = user, ExpressPostCount = (await _takeExpressService.GetAllActiveMissionByPostUserAsync(user)).Count, PurchasePostCount = (await _purchaseService.GetAllActiveMissionByPostUserAsync(user)).Count, FleaMarketPostCount = (await _fleaMarketService.GetAllActiveMissionByPostUserAsync(user)).Count, HireMarketPostCount = (await _hireService.GetAllActiveMissionByPostUserAsync(user)).Count, }; UserPackage.Add(userInformation); } }