public EntityFrameworkRepositoryContext()
        {
            _context = new EntityFrameworkContext();

            _interviewRepository = new InterviewRepository(_context);
            _interviewerRepository = new InterviewerRepository(_context);
        }
 public InterviewerQuery(IInterviewerRepository interviewerRepository,
                         IInterviewQuery interviewQuery)
 {
     this.interviewerRepository = interviewerRepository
                                  ?? throw new ArgumentNullException(nameof(interviewerRepository));
     this.interviewQuery = interviewQuery
                           ?? throw new ArgumentNullException(nameof(interviewQuery));
 }
        public HrReworkQuery(ICandidateRepository candidateRepository,
                             IInterviewerRepository interviewerRepository,
                             IInterviewRepository interviewRepository)
        {
            Field <ListGraphType <CandidateGraphType> >(
                Constants.GraphQl.CandidatesField,
                resolve: context => candidateRepository.Find());

            Field <ListGraphType <InterviewGraphType> >
                (Constants.GraphQl.InterviewsField,
                resolve: context => interviewRepository.Find());

            Field <ListGraphType <InterviewerGraphType> >
                (Constants.GraphQl.InterviewersField,
                resolve: context => interviewerRepository.Find());

            Field <CandidateGraphType>(
                Constants.GraphQl.CandidateField,
                arguments: new QueryArguments(new QueryArgument <IdGraphType>
            {
                Name = "id"
            }),
                resolve: context =>
            {
                var id = context.GetArgument <int>("id");
                return(candidateRepository.FirstOrDefault(x => x.Id == id));
            });

            Field <InterviewerGraphType>(
                Constants.GraphQl.InterviewerField,
                arguments: new QueryArguments(new QueryArgument <IdGraphType>
            {
                Name = "id"
            }),
                resolve: context =>
            {
                var id = context.GetArgument <int>("id");
                return(interviewerRepository.FirstOrDefault(x => x.Id == id));
            });

            Field <InterviewGraphType>(
                Constants.GraphQl.InterviewField,
                arguments: new QueryArguments(new QueryArgument <IdGraphType>
            {
                Name = "id"
            }),
                resolve: context =>
            {
                var id = context.GetArgument <int>("id");
                return(interviewRepository.FirstOrDefault(x => x.Id == id));
            });
        }
 public InterviewerService(IInterviewerRepository interviewerRepository, IWorkerService workerService, IMapper mapper)
 {
     _interviewerRepository = interviewerRepository;
     _workerService         = workerService;
     _mapper = mapper;
 }
 public InterviewerService(IUnitOfWork unitOfWork, IDBHelper idbHelper, IInterviewerRepository <Interviewer> interviewRepository, IMapper mapper) : base(unitOfWork, idbHelper, mapper)
 {
     _interviewRepository = interviewRepository;
 }
 public InterviewerService(IInterviewerRepository repository)
 {
     this.repository = repository;
 }