Пример #1
0
        protected async override Task OnInitializedAsync()
        {
            // return base.OnInitializedAsync();

            _appUserService    = (AppUserService)ScopedServices.GetRequiredService(typeof(AppUserService));
            _bloodService      = (BloodService)ScopedServices.GetRequiredService(typeof(BloodService));
            _rankService       = (RankService)ScopedServices.GetRequiredService(typeof(RankService));
            _gamesGroupService = (GamesGroupService)ScopedServices.GetRequiredService(typeof(GamesGroupService));

            Items = await _appUserService.GetAllActiveUsers().ToListAsync();

            Bloods = await _bloodService.GetAllActive().ToListAsync();

            Ranks = await _rankService.GetAllActive().ToListAsync();

            GamesGroups = await _gamesGroupService.GetAllActiveGamesGroups().ToListAsync();
        }
Пример #2
0
        protected async override Task OnInitializedAsync()
        {
            // return base.OnInitializedAsync();

            _newsService       = (NewsService)ScopedServices.GetRequiredService(typeof(NewsService));
            _appUserService    = (AppUserService)ScopedServices.GetRequiredService(typeof(AppUserService));
            _gamesGroupService = (GamesGroupService)ScopedServices.GetRequiredService(typeof(GamesGroupService));
            _imageService      = (ImageService)ScopedServices.GetRequiredService(typeof(ImageService));

            Items = await _newsService.GetAllActiveNews().ToListAsync();

            AppUsers = await _appUserService.GetAllActiveUsers().ToListAsync();

            GamesGroups = await _gamesGroupService.GetAllActiveGamesGroups().ToListAsync();

            Images = await _imageService.GetAllActive().ToListAsync();
        }
Пример #3
0
        private async Task SaveAsync()
        {
            Items = await _appUserService.GetAllActiveUsers().ToListAsync();

            _showAdd = false;
        }