// GET: /EntrantUser/Hobbie/ public async Task <ActionResult> Index() { var entrantId = await _infoExtractor.ExtractEntrantId(User.Identity.GetUserId()); var assignedHobbies = await _queryBuilder .For <Task <IEnumerable <AssignedHobbie> > >() .With(new GetAssignedHobbiesCriterion { EntrantId = entrantId }); return(View(assignedHobbies)); }
// GET: /EntrantUser/UnitedStateExams/ public async Task <ActionResult> Index() { var entrantId = await _infoExtractor.ExtractEntrantId(User.Identity.GetUserId()); var usExam = await _queryBuilder .For <Task <IEnumerable <UnitedStateExam> > >() .With(new GetUnitedStateExamsOfEntrantCriterion { EntrantId = entrantId }); return(View(usExam)); }
// GET: /EntrantUser/SchoolMark/ public async Task <ActionResult> Index() { var entrantId = await _infoExtractor.ExtractEntrantId(User.Identity.GetUserId()); var schoolMarks = await _queryBuilder .For <Task <IEnumerable <SchoolMark> > >() .With(new GetSchoolMarksOfEntrantCriterion { EntrantId = entrantId }); return(View(schoolMarks)); }
// GET: EntrantUser/Recomendations public async Task <ActionResult> Index() { var entrantId = await _infoExtractor.ExtractEntrantId(User.Identity.GetUserId()); var entrant = await _queryBuilder .For <Task <Entrant> >() .With(new GetEntrantForCharacterizerCriterion { EntrantId = entrantId }); var educationLines = await _queryBuilder .For <Task <List <EducationLine> > >() .With(new GetEducationLinesForCharacterizerCriterion()); //Рекомендации: //1. По методу сравнения расстояний мд характеристиками ViewBag.DistanceRecomendations = await _distanceRecomendator.GetRecomendation(entrant, educationLines); //2. По методу многокритериального анализа ViewBag.MulticriterialRecomendations = await _multicriterialAnalysisRecomendator.Calculate(entrant, educationLines); //3. По говнокоду AHP метод //TODO: выпилить этот говнокод вместе с проектом после публикации статьи(или переписать) await CalculateAhp(entrant, educationLines); return(View()); }
// GET: /EntrantUser/Olympiad/ public async Task <ActionResult> Index() { var entrantId = await _infoExtractor.ExtractEntrantId(User.Identity.GetUserId()); var participationinolympiads = await _queryBuilder .For <Task <IEnumerable <ParticipationInOlympiad> > >() .With(new GetAllParticipationInOlympiadCriterion { EntrantId = entrantId }); return(View(participationinolympiads)); }
// GET: /EntrantUser/Orientation/ public async Task <ActionResult> Index() { var entrantId = await _infoExtractor.ExtractEntrantId(User.Identity.GetUserId()); var entrant = await _queryBuilder.For <Task <Entrant> >() .With(new GetEntrantForCharacterizerCriterion { EntrantId = entrantId }); //Предпочтения пользователя по предметам и пр. var entrantCharacteristics = await _entrantCharacterizer.Calculate(entrant); //add true for complicated method ViewBag.Preferences = entrantCharacteristics; return(View()); }
public OlympiadControllerTest() { _requestContext = SubstituteRequerstContext(); _infoExtractor.ExtractEntrantId("").ReturnsForAnyArgs(Task.FromResult(EntrantId)); }