Exemplo n.º 1
0
        public IActionResult applicants()
        {
            ApplicantsVM vm = new ApplicantsVM();

            vm.Applications = _db.Application.Include(a => a.Applicant).ThenInclude(y => y.ApplicationUser).Include(a => a.Applicant).ThenInclude(b => b.University).ToList();
            vm.OApplicants  = _db.Applicant.Include(a => a.ApplicationUser).Include(b => b.University).ToList().Where(x => x.UniversityId == 23).ToList();
            return(View(vm));
        }
        public IActionResult Index()
        {
            ApplicantsVM vm = new ApplicantsVM();

            vm.IApplicants = _db.Applicant.Include(y => y.ApplicationUser).Include(q => q.University).Where(a => a.UniversityId != 2).OrderBy(x => x.CreatedProfile).ToList();
            vm.OApplicants = _db.Applicant.Include(a => a.ApplicationUser).Include(b => b.University).Where(x => x.UniversityId == 2).OrderBy(y => y.CreatedProfile).ToList();
            return(View(vm));
        }