예제 #1
0
        public async Task <IActionResult> Index()
        {
            HomeViewModel model = new HomeViewModel();

            StatProvider statProvider = new StatProvider();

            model.MainStat = await statProvider.GetStatAsync();

            VacancyProvider vacancyProvider = new VacancyProvider();
            var             hotVacancies    = await vacancyProvider.GetVacancyAsync();

            model.HotVacancies = hotVacancies.Take(10).ToList();

            return(View(model));
        }
예제 #2
0
        public async Task <IActionResult> Index(string specUid = "")
        {
            CandidatsViewModel model = new CandidatsViewModel();

            CandidateProvider candidateProvider = new CandidateProvider();
            var candidats = await candidateProvider.GetCandidats(specUid);

            model.Candidats = candidats;

            StatProvider statProvider = new StatProvider();

            model.MainStat = await statProvider.GetStatAsync();

            return(View(model));
        }