public async Task <ActionResult> Recommended()
        {
            var user = await UserFacade.GetUserByEmail(User.Identity.Name);

            var offers = await JobOfferFacade.GetRecommendedOffersForUser(user.Id, 10);

            return(View(offers));
        }
Exemplo n.º 2
0
        private static async Task TestRecommendedJobs(Mapper mapper)
        {
            JobOfferFacade jobOfferFacade = new JobOfferFacade(Provider, mapper,
                                                               new JobOfferService(mapper, new JobOfferRepository(Provider),
                                                                                   new JobOfferQueryObject(mapper, new EntityFrameworkQuery <JobOffer>(Provider)), new SkillRepository(Provider)),
                                                               new SkillService(mapper, new SkillRepository(Provider),
                                                                                new SkillQueryObject(mapper, new EntityFrameworkQuery <SkillTag>(Provider))),
                                                               new JobOfferRecommendationService(),
                                                               new UserService(mapper, new UserRepository(Provider),
                                                                               new UserQueryObject(mapper, new EntityFrameworkQuery <User>(Provider)),
                                                                               new SkillRepository(Provider)));

            var results = await jobOfferFacade.GetRecommendedOffersForUser(1, 10);

            foreach (var resultsItem in results)
            {
                Console.WriteLine(resultsItem.Name);
            }
        }