예제 #1
0
 public GetAllUserQueryHandler(IJobAppliedRepository repository, IAuthenticatedUserService _authenticatedUser, IJobApplicationRepository _jobApplicationRepository, UserManager <ApplicationUser> _userManager)
 {
     _repository                    = repository;
     this._authenticatedUser        = _authenticatedUser;
     this._jobApplicationRepository = _jobApplicationRepository;
     this._userManager              = _userManager;
 }
예제 #2
0
 public CreatePlanCommandHandler(IPaymentPlanRepository planRepository, IMapper mapper,
                                 IAuthenticatedUserService authenticatedUser)
 {
     _planRepository    = planRepository;
     _mapper            = mapper;
     _authenticatedUser = authenticatedUser;
 }
예제 #3
0
 public DeleteCommandHandler(ICompanyRepository repository, IUnitOfWork unitOfWork, IAuthenticatedUserService authenticatedUser, UserManager <ApplicationUser> userManager)
 {
     _repository        = repository;
     _unitOfWork        = unitOfWork;
     _userManager       = userManager;
     _authenticatedUser = authenticatedUser;
 }
        public MyNoteQuery(INoteService noteService, ICacheManager cacheManager, IAuthenticatedUserService authenticatedUserService)
        {
            Field <ListGraphType <NoteType> >(
                "my_all_notes",
                resolve: context =>
            {
                string cacheKey = $"my_all_notes_{authenticatedUserService.UserEmail}";
                var data        = cacheManager.Get(cacheKey, () => { return(noteService.GetAllMyNotes()); });
                return(data);
            });

            Field <NoteType>(
                "note_by_id",
                arguments: new QueryArguments(new QueryArgument <IntGraphType> {
                Name = "id"
            }),
                resolve: context =>
            {
                int noteId = context.GetArgument <int>("id");
                return(noteService.GetNoteById(noteId));
            });

            Field <ListGraphType <NoteType> >(
                "my_all_notes_by_category",
                arguments: new QueryArguments(new QueryArgument <StringGraphType> {
                Name = "category"
            }),
                resolve: context =>
            {
                string category = context.GetArgument <string>("category");
                return(noteService.GetNotesByCategory(category));
            });
        }
예제 #5
0
 public GetAllContracsQueryHandler(IAuthenticatedUserService authenticatedUserService,
                                   IContractRepository contractRepository
                                   )
 {
     _authenticatedUserService = authenticatedUserService;
     _contractRepository       = contractRepository;
 }
예제 #6
0
 public ApplicationDbContext(DbContextOptions <ApplicationDbContext> options, IDateTimeService dateTime, IAuthenticatedUserService authenticatedUser) : base(options)
 {
     ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.NoTracking;
     ChangeTracker.LazyLoadingEnabled    = false;
     _dateTime          = dateTime;
     _authenticatedUser = authenticatedUser;
 }
예제 #7
0
 public IRequest(IAuthenticatedUserService authenticatedUserService, UserManager <User> userManager,
                 ISmtpEmailSender smtpEmailSender)
 {
     _authenticatedUserService = authenticatedUserService;
     _userManager     = userManager;
     _smtpEmailSender = smtpEmailSender;
 }
예제 #8
0
 public UploadCommandHandler(IAttachmentRepository repository, IUnitOfWork unitOfWork, IMapper mapper, IAuthenticatedUserService authenticatedUser)
 {
     _repository        = repository;
     _unitOfWork        = unitOfWork;
     _mapper            = mapper;
     _authenticatedUser = authenticatedUser;
 }
예제 #9
0
 public CreateCategoryCommandHandler(ICategoryRepository categoryRepository, IUnitOfWork unitOfWork, IMapper mapper, IAuthenticatedUserService authenticatedUser)
 {
     _categoryRepository = categoryRepository;
     _unitOfWork         = unitOfWork;
     _mapper             = mapper;
     _authenticatedUser  = authenticatedUser;
 }
 public DeletePlaceTypeCommandHandler(ILicensePlateRepository repository, IUnitOfWork unitOfWork, UserManager <ApplicationUser> _userManager, IAuthenticatedUserService _authenticatedUser)
 {
     _repository             = repository;
     _unitOfWork             = unitOfWork;
     this._userManager       = _userManager;
     this._authenticatedUser = _authenticatedUser;
 }
 public GetAllBankDetailsQueryHandler(IBankDetailRepositoryAsync bankDetailRepository, IMapper mapper,
                                      IAuthenticatedUserService authenticatedUserService)
 {
     _bankDetailRepository = bankDetailRepository;
     _mapper = mapper;
     _authenticatedUserService = authenticatedUserService;
 }
 public DeleteProductCategoryByIdCommandHandler(IProductCategoryRepositoryAsync productRepository, IUnitOfWork unitOfWork, IDateTimeService dateTime, IAuthenticatedUserService authenticatedUser)
 {
     _productCategoryRepository = productRepository;
     _unitOfWork        = unitOfWork;
     _dateTime          = dateTime;
     _authenticatedUser = authenticatedUser;
 }
 public CreateReligionCommandHandler(IReligionRepository repository, IUnitOfWork unitOfWork, IMapper mapper, IAuthenticatedUserService authenticatedUser)
 {
     _repository        = repository;
     _unitOfWork        = unitOfWork;
     _mapper            = mapper;
     _authenticatedUser = authenticatedUser;
 }
예제 #14
0
 public LogoutModel(SignInManager <ApplicationUser> signInManager, ILogger <LogoutModel> logger, IMediator mediator, IAuthenticatedUserService userService)
 {
     _signInManager = signInManager;
     _logger        = logger;
     _mediator      = mediator;
     _userService   = userService;
 }
 public CreateAreaCommandHandler(IEcommerceCategoryRepository repository, IUnitOfWork unitOfWork, IMapper mapper, IAuthenticatedUserService authenticatedUser)
 {
     _repository        = repository;
     _unitOfWork        = unitOfWork;
     _mapper            = mapper;
     _authenticatedUser = authenticatedUser;
 }
 public CreateCommandHandler(IAttributeValueRepository repository, IUnitOfWork unitOfWork, IMapper mapper, IAuthenticatedUserService authenticatedUser)
 {
     _repository        = repository;
     _unitOfWork        = unitOfWork;
     _mapper            = mapper;
     _authenticatedUser = authenticatedUser;
 }
예제 #17
0
 public NoteService(IGenericRepository <Note> repository, IAuthenticatedUserService authenticatedUserService, IUnitOfWork unitOfWork)
 {
     _repository = repository;
     _authenticatedUserService = authenticatedUserService;
     _userEmail  = _authenticatedUserService.UserEmail;
     _unitOfWork = unitOfWork;
 }
 public CreatePlaceTypeCommandHandler(ITrafficTicketRepository repository, IUnitOfWork unitOfWork, IMapper mapper, IAuthenticatedUserService authenticatedUser)
 {
     _repository        = repository;
     _unitOfWork        = unitOfWork;
     _mapper            = mapper;
     _authenticatedUser = authenticatedUser;
 }
예제 #19
0
 public ApplicationDbContext(DbContextOptions <ApplicationDbContext> options, IDateTimeService dateTime, IAuthenticatedUserService authenticatedUser, IDomainEventService domainEventService) : base(options)
 {
     ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.NoTracking;
     _dateTime           = dateTime;
     _authenticatedUser  = authenticatedUser;
     _domainEventService = domainEventService;
 }
 public CreateJobAgeCommandHandler(IIndustryRepository repository, IUnitOfWork unitOfWork, IMapper mapper, IAuthenticatedUserService authenticatedUser)
 {
     _repository        = repository;
     _unitOfWork        = unitOfWork;
     _mapper            = mapper;
     _authenticatedUser = authenticatedUser;
 }
 public DownloadDocumentByIdQueryHandler(IDocumentRepositoryAsync documentRepository, IAuthenticatedUserService authenticatedUser, IOptions <DocumentSettings> settings, ICryptographyService cryptographyService)
 {
     _documentRepository  = documentRepository;
     _authenticatedUser   = authenticatedUser;
     _settings            = settings.Value;
     _cryptographyService = cryptographyService;
 }
예제 #22
0
        public MyNoteMutation(INoteService noteService, IAuthenticatedUserService authenticatedUserService)
        {
            Field <NoteType>(
                name: "createNote",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <NoteInputType> > {
                Name = "note"
            }),
                resolve: context =>
            {
                Note note       = context.GetArgument <Note>("note");
                note.OwnerEmail = authenticatedUserService.UserEmail;
                return(noteService.InsertNote(note));
            });

            Field <StringGraphType>(
                name: "deleteNote",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <IntGraphType> > {
                Name = "id"
            }),
                resolve: context =>
            {
                int id   = context.GetArgument <int>("id");
                bool res = noteService.DeleteNote(id);
                if (res)
                {
                    return("Note deleted");
                }
                return("Try to delete again");
            });
        }
예제 #23
0
 public CommentsController(
     IAuthenticatedUserService authenticatedUser,
     AppDbContext context
     )
 {
     _authenticatedUser = authenticatedUser;
     _context           = context;
 }
 public GetDocumentsByTermsQueryHandler(IAuthenticatedUserService authenticatedUser, IDocumentRepositoryAsync documentRepository, IDocumentTypeRepositoryAsync documentTypeRepository, IMapper mapper, IDocumentTagRepositoryAsync documentTagRepository)
 {
     _authenticatedUser      = authenticatedUser;
     _repository             = documentRepository;
     _mapper                 = mapper;
     _documentTypeRepository = documentTypeRepository;
     _documentTagRepository  = documentTagRepository;
 }
 public DeleteCommandHandler(IRecruitmentRepository repository, IAuthenticatedUserService authenticatedUser, UserManager <ApplicationUser> userManager, IRecruitmentBenefitRepository recruitmentBenefitRepository, IUnitOfWork unitOfWork)
 {
     _repository = repository;
     _unitOfWork = unitOfWork;
     _recruitmentBenefitRepository = recruitmentBenefitRepository;
     _userManager       = userManager;
     _authenticatedUser = authenticatedUser;
 }
 public CoursesController(
     AppDbContext context,
     IAuthenticatedUserService authenticatedUser
     )
 {
     _context           = context;
     _authenticatedUser = authenticatedUser;
 }
예제 #27
0
 public ChangeStatusCommandHandler(IRecruitmentRepository repository, UserManager <ApplicationUser> userManager, IUnitOfWork unitOfWork, IMapper mapper, IAuthenticatedUserService authenticatedUser)
 {
     _repository        = repository;
     _unitOfWork        = unitOfWork;
     _mapper            = mapper;
     _authenticatedUser = authenticatedUser;
     _userManager       = userManager;
 }
예제 #28
0
 public UpdateCommandHandler(UserManager <ApplicationUser> _userManager, IAuthenticatedUserService _authenticatedUser, IJobApplicationRepository repository, IUnitOfWork unitOfWork, IMapper mapper)
 {
     _repository             = repository;
     _unitOfWork             = unitOfWork;
     _mapper                 = mapper;
     this._authenticatedUser = _authenticatedUser;
     this._userManager       = _userManager;
 }
예제 #29
0
 public CreateAreaCommandHandler(IAreaRepository repository, IAreaTypeRepository areaTypeRepository, IUnitOfWork unitOfWork, IMapper mapper, IAuthenticatedUserService authenticatedUser)
 {
     _repository         = repository;
     _unitOfWork         = unitOfWork;
     _mapper             = mapper;
     _authenticatedUser  = authenticatedUser;
     _areaTypeRepository = areaTypeRepository;
 }
 public CodeFormattingTests(ICodeSwifterStarterDbContext context,
                            IAuthenticatedUserService authenticatedUserService,
                            ServerConfiguration serverConfiguration, ILogger <CodeFormattingTests> logger) :
     base(context, authenticatedUserService)
 {
     _serverConfiguration = serverConfiguration;
     _logger = logger;
 }