示例#1
0
        public CVQuery(ICVRepository cvRepository,
                       ICompanyRepository companyRepository,
                       IProjectRepository projectRepository,
                       IEducationRepository educationRepository,
                       ILinkRepository linkRepository)
        {
            Field <CVType>("cv",
                           arguments:
                           new QueryArguments(
                               new QueryArgument <IntGraphType> {
                Name = "id"
            }),
                           resolve: context =>
                           cvRepository
                           .Get(context.GetArgument <int>("id")));

            Field <ListGraphType <CVType> >("cvs",
                                            resolve: context => cvRepository.All());

            Field <CompanyType>("company",
                                arguments:
                                new QueryArguments(
                                    new QueryArgument <IntGraphType> {
                Name = "id"
            }),
                                resolve: context =>
                                companyRepository
                                .Get(context.GetArgument <int>("id")));

            Field <ProjectType>("project",
                                arguments:
                                new QueryArguments(
                                    new QueryArgument <IntGraphType> {
                Name = "id"
            }),
                                resolve: context =>
                                projectRepository
                                .Get(context.GetArgument <int>("id")));

            Field <EducationType>("education",
                                  arguments:
                                  new QueryArguments(
                                      new QueryArgument <IntGraphType> {
                Name = "id"
            }),
                                  resolve: context =>
                                  educationRepository
                                  .Get(context.GetArgument <int>("id")));

            Field <LinkType>("link",
                             arguments:
                             new QueryArguments(
                                 new QueryArgument <IntGraphType> {
                Name = "id"
            }),
                             resolve: context =>
                             linkRepository
                             .Get(context.GetArgument <int>("id")));
        }
示例#2
0
 public UnitOfWork(
     ApplicationDbContext context,
     IVacancyRepository vacancyRepository,
     IVacancyCityRepository vacancyCityRepository,
     ICVRepository cvRepository,
     ISkillRepository skillRepository,
     ICompanyRepository companyRepository,
     ICompanyCityRepository companyCityRepository,
     IJobExperienceRepository jobExperienceRepository,
     IKnowledgeLevelRepository knowledgeLevelRepository,
     IDegreeRepository degreeRepository,
     ISpecialityRepository specialityRepository,
     IEducationRepository educationRepository,
     IUserRepository userRepository,
     IQualificationRepository qualificationRepository,
     ISkillRequirementRepository skillRequirementRepository,
     ISkillTypeRepository skillTypeRepository,
     IUserCompanyRepository userCompanyRepository,
     IExperienceRepository experienceRepository,
     ICityRepository cityRepository,
     ICountryRepository countryRepository,
     ITechnologyRepository technologyRepository,
     IVacancyCVFlowRepository vacancyCVFlowRepository)
 {
     _context                    = context;
     _skillTypeRepository        = skillTypeRepository;
     _skillRepository            = skillRepository;
     _companyRepository          = companyRepository;
     _userRepository             = userRepository;
     _vacancyRepository          = vacancyRepository;
     _vacancyCityRepository      = vacancyCityRepository;
     _cvRepository               = cvRepository;
     _companyCityRepository      = companyCityRepository;
     _qualificationRepository    = qualificationRepository;
     _skillRequirementRepository = skillRequirementRepository;
     _jobExperienceRepository    = jobExperienceRepository;
     _degreeRepository           = degreeRepository;
     _specialityRepository       = specialityRepository;
     _educationRepository        = educationRepository;
     _knowledgeLevelRepository   = knowledgeLevelRepository;
     _userCompanyRepository      = userCompanyRepository;
     _experienceRepository       = experienceRepository;
     _cityRepository             = cityRepository;
     _countryRepository          = countryRepository;
     _technologyRepository       = technologyRepository;
     _vacancyCVFlowRepository    = vacancyCVFlowRepository;
 }
 public GetAllCVsOperation(ICVRepository cvRepository,
                           IMapper <Entities.CV, DTOs.CV> cvMapper)
 {
     _cvRepository = cvRepository;
     _cvMapper     = cvMapper;
 }