public async Task <IActionResult> OnGetAsync() { Posts = await _fleaMarketService.GetAllActiveMissionAsync(); SingleUserMark = false; return(Page()); }
public async Task <IActionResult> OnGetAsync() { var user = await _userManager.GetUserAsync(User); Count = new PostCount { TakeExpress = new TakeExpressPostCount { ActivePostCount = _takeExpressService.GetAllActiveMissionAsync().Result.Count.ToString(), InvalidPostCount = _takeExpressService.GetAllInvalidMissionAsync().Result.Count.ToString(), DeletedPostCount = _takeExpressService.GetAllDeletedMissionAsync().Result.Count.ToString() }, Purchase = new PurchasePostCount { ActivePostCount = _purchaseService.GetAllActiveMissionAsync().Result.Count.ToString(), InvalidPostCount = _purchaseService.GetAllInvalidMissionAsync().Result.Count.ToString(), DeletedPostCount = _purchaseService.GetAllDeletedMissionAsync().Result.Count.ToString() }, FleaMarket = new FleaMarketPostCount { ActivePostCount = _fleaMarketService.GetAllActiveMissionAsync().Result.Count.ToString(), InvalidPostCount = _fleaMarketService.GetAllInvalidMissionAsync().Result.Count.ToString(), DeletedPostCount = _fleaMarketService.GetAllDeletedMissionAsync().Result.Count.ToString() }, HirePost = new HirePostCount { ActivePostCount = _hireService.GetAllActiveMissionAsync().Result.Count.ToString(), InvalidPostCount = _hireService.GetAllInvalidMissionAsync().Result.Count.ToString(), DeletedPostCount = _hireService.GetAllDeletedMissionAsync().Result.Count.ToString() }, }; return(Page()); }
public async Task <IActionResult> OnGetAsync() { UserCount = await _userManager.Users.CountAsync(); RoleCount = await _roleManager.Roles.CountAsync(); PostsCount = (await _takeExpressService.GetAllActiveMissionAsync()).Count + (await _purchaseService.GetAllActiveMissionAsync()).Count + (await _fleaMarketService.GetAllActiveMissionAsync()).Count + (await _hireService.GetAllActiveMissionAsync()).Count; return(Page()); }