예제 #1
0
 public ReadFacade(
     IMapper mapper,
     IReadRepository <Person> dbRepo)
 {
     this.mapper = mapper;
     this.dbRepo = dbRepo;
 }
예제 #2
0
 public ProjectBusiness(IReadRepository readRepository, IRepository repository, IWriteRepository writeRepository, IUserAccessBusiness userAccessBusiness)
 {
     _readRepository = readRepository;
     _repository = repository;
     _writeRepository = writeRepository;
     _userAccessBusiness = userAccessBusiness;
 }
 public RoadmapService(
     IMapper mapper,
     IReadRepository <RoadmapItemModel> roadmapRepository)
 {
     _roadmapRepository = Guard.Against.Null(roadmapRepository, nameof(roadmapRepository), nameof(IReadRepository <RoadmapItemModel>));
     _mapper            = Guard.Against.Null(mapper, nameof(mapper), nameof(IMapper));
 }
예제 #4
0
 public MembershipController(IHttpContextAccessor httpContextAccessor,
                             UserManager <User> userManager, IMapper mapper, IReadRepository db)
 {
     _userId = userManager.GetUserId(httpContextAccessor.HttpContext.User);
     _mapper = mapper;
     _db     = db;
 }
예제 #5
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="configuration">Ranking configuration.</param>
 /// <param name="readRepository">Instance of <see cref="IReadRepository"/>.</param>
 /// <exception cref="ArgumentNullException"><paramref name="configuration"/> or inner value is <c>Null</c>.</exception>
 /// <exception cref="ArgumentNullException"><paramref name="readRepository"/> is <c>Null</c>.</exception>
 public StatisticsProvider(
     IReadRepository readRepository,
     IOptions <RankingConfiguration> configuration)
 {
     _readRepository = readRepository ?? throw new ArgumentNullException(nameof(readRepository));
     _configuration  = configuration?.Value ?? throw new ArgumentNullException(nameof(configuration));
 }
예제 #6
0
 /// <summary>
 /// Creates Room Controller.
 /// </summary>
 /// <param name="mappingConfig"></param>
 /// <param name="repository"></param>
 public RoomController(
     TypeAdapterConfig mappingConfig,
     IReadRepository <Room> repository)
 {
     MappingConfig = mappingConfig;
     Repository    = repository;
 }
예제 #7
0
 public CustomerEarningsService(
     IReadRepository <Customer> customerReadRepository,
     IWriteRepository <TotalEarningForCustomerInMonth> totalEarningWriteRepository)
 {
     _customerReadRepository      = customerReadRepository;
     _totalEarningWriteRepository = totalEarningWriteRepository;
 }
예제 #8
0
 public ChannelController(IChannelManager ChannelManager,
                          IReadRepository <Read.Channel, int> readRepository, IWriteRepository <Write.Channel, int> writeRepository)
 {
     _ChannelManager  = ChannelManager;
     _readRepository  = readRepository;
     _writeRepository = writeRepository;
 }
예제 #9
0
 public GetLabelsQueryHandler(
     IReadRepository<Label, Guid> labelRepository,
     IMapper mapper)
 {
     _labelRepository = labelRepository;
     _mapper = mapper;
 }
예제 #10
0
 public GamesService(
     IMapper mapper,
     IReadRepository <GameModel> gamesRepository)
 {
     _mapper          = mapper;
     _gamesRepository = gamesRepository;
 }
예제 #11
0
        public MonitoQuery(
            IMapper mapper,
            IReadRepository <RequestPersistenceModel> requestRepository
            )
        {
            Field <ListGraphType <RequestGraphType> >(
                "requests",
                resolve: context =>
                requestRepository
                .FindAll()
                .ProjectTo <MinimalRequestApplicationModel>(mapper.ConfigurationProvider)
                );

            Field <RequestGraphType>(
                "request",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <IdGraphType> >()
            {
                Name = "id"
            }
                    ),
                resolve: context => {
                var id = context.GetArgument <int>("id");
                return(requestRepository
                       .FindAll(x => x.ID == id)
                       .ProjectTo <MinimalRequestApplicationModel>(mapper.ConfigurationProvider)
                       .FirstOrDefault());
            }
                );
        }
예제 #12
0
 public DeleteService(IMapper mapper, IReadRepository <TEntity> readRepository, IWriteRepository <TEntity> writeRepository, IModelValidator <TModel> validator)
 {
     _mapper          = mapper;
     _readRepository  = readRepository;
     _writeRepository = writeRepository;
     _validator       = validator;
 }
예제 #13
0
 public RaceService(Context context)
 {
     _context           = context;
     _readRepository    = new ReadRepository(_context);
     _readerRepository  = new ReaderRepository(_context);
     _readingRepository = new ReadingRepository(_context);
 }
예제 #14
0
        public UpdateTreatmentSessionBusinessValidator(
            IStringLocalizer <UpdateTreatmentSessionBusinessValidator> localizer,
            IStringLocalizer <TreatmentSessionBusinessValidator> addLocalizer,
            UpdateTreatmentSessionValidator simpleValidator,
            IReadRepository <TreatmentSession> treatmentSessionRepository)
        {
            RuleFor(m => m)
            .SetValidator(simpleValidator)
            .DependentRules(() =>
            {
                RuleFor(m => m.ReferenceId)
                .MustAsync((m, ctx, ct) => ExistsTreatmentSession(m, ct))
                .WithMessage(localizer[NotExistingTreatmentSessionMessageName])
                .DependentRules(() =>
                {
                    RuleFor(m => m.PatientReferenceId)
                    .MustAsync((m, ctx, ct) => HasNoOverlappingsForPatient(m, ct))
                    .WithMessage(addLocalizer[TreatmentSessionBusinessValidator.OverlappingTreatmentSessionForPatientMessageName]);

                    RuleFor(m => m.DentalTeamReferenceId)
                    .MustAsync((m, ctx, ct) => HasNoOverlappingsForDentalTeam(m, ct))
                    .WithMessage(addLocalizer[TreatmentSessionBusinessValidator.OverlappingTreatmentSessionForDentalTeamMessageName]);
                });
            });

            TreatmentSessionRepository = treatmentSessionRepository;
        }
예제 #15
0
 public StudentCourseService(IReadRepository readRepository, IWriteRepository writeRepository, IStudentCourseMapper studentCourseMapper, ICourseMapper courseMapper)
 {
     this.readRepository      = readRepository ?? throw new ArgumentNullException();
     this.writeRepository     = writeRepository ?? throw new ArgumentNullException();
     this.studentCourseMapper = studentCourseMapper ?? throw new ArgumentNullException();
     this.courseMapper        = courseMapper ?? throw new ArgumentNullException();
 }
예제 #16
0
 public ServiceBase(IUnitOfWork unitOfWork, IReadUnit readUnit)
 {
     _unitOfWork      = unitOfWork ?? throw new ArgumentException("Unit of Work");
     _readUnit        = readUnit ?? throw new ArgumentException("Read Unit");
     _writeRepository = _unitOfWork.WriteRepository <T>();
     _readRepository  = _readUnit.ReadRepository <T>();
 }
 public LocationOverviewService(
     IMapper mapper,
     IReadRepository <LocationOverviewModel> locationOverviewRepository)
 {
     _mapper = Guard.Against.Null(mapper, nameof(mapper), nameof(IMapper));
     _locationOverviewRepository = Guard.Against.Null(locationOverviewRepository, nameof(locationOverviewRepository), nameof(IReadRepository <LocationOverviewModel>));
 }
예제 #18
0
 public HomeController(
     ICreateRepository <Contract> createRepo,
     IReadRepository <Contract> readRepo,
     IUpdateRepository <Contract> updateRepo,
     IDeleteRepository <Contract> deleteRepo) : base(createRepo, readRepo, updateRepo, deleteRepo)
 {
 }
 public ProfessorService(IReadRepository readRepository, IWriteRepository writeRepository,
                         IProfessorMapper professorMapper)
 {
     this.writeRepository = writeRepository ?? throw new ArgumentNullException();
     this.readRepository  = readRepository ?? throw new ArgumentNullException();
     this.professorMapper = professorMapper ?? throw new ArgumentNullException();
 }
예제 #20
0
 public PersonService(
     IReadRepository <Person> personRepository,
     IWriteRepository <Person> personWriteRepository)
 {
     _personRepository      = personRepository;
     _personWriteRepository = personWriteRepository;
 }
예제 #21
0
 public ReadTagsBackgroundService(IOptions <ReadTagsBackgroundSettings> options, IReadServiceBus readServiceBus, IReadRepository readRepository, ILogger <ReadTagsBackgroundService> logger)
 {
     _readTagsBackgroundSettings = options.Value;
     _readServiceBus             = readServiceBus;
     _readRepository             = readRepository;
     _logger = logger;
 }
 public ReadingViewModel()
 {
     _context                 = new Context();
     _readRepository          = new ReadRepository(_context);
     Reads                    = new ObservableCollection <Read>();
     Reads.CollectionChanged += ContentCollectionChanged;
 }
예제 #23
0
        public void AddNewReadBook(IAddNewReadBookView inForm, IReadRepository readRepository)
        {
            if (inForm.ShowViewModal() == true)
            {
                try
                {
                    string   title     = inForm.Title;
                    string   author    = inForm.Author;
                    string   publisher = inForm.Publisher;
                    DateTime datePub   = inForm.DatePublished;
                    int      numPages  = inForm.NumberOfPages;
                    string   genre     = inForm.Genre;
                    DateTime dateRead  = inForm.DateRead;
                    int      rating    = inForm.Rating;

                    BookRead newRead = BookFactory.CreateBookRead(title, author, publisher, datePub, numPages, genre, dateRead, rating);

                    readRepository.AddBookRead(newRead);
                }
                catch (Exception ex)
                {
                    MessageBox.Show("EXCEPTION: " + ex.Message);
                    throw;
                }
            }
        }
 public UomReadController
 (
     IReadRepository <Uom> repository,
     IPageLinksBuilder pageLinksBuilder
 ) : base(repository, pageLinksBuilder)
 {
 }
예제 #25
0
 /// <summary>
 /// Creates Treatment Controller.
 /// </summary>
 /// <param name="mappingConfig"></param>
 /// <param name="repository"></param>
 public TreatmentController(
     TypeAdapterConfig mappingConfig,
     IReadRepository <Treatment> repository)
 {
     MappingConfig = mappingConfig;
     Repository    = repository;
 }
예제 #26
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GetQueryHandler{TModel, TEntity}"/> class.
 /// </summary>
 /// <param name="repository">The entity repository.</param>
 /// <param name="mapper">The entity mapper.</param>
 public GetQueryHandler(IReadRepository <TEntity> repository, IMapper mapper)
 {
     Guard.ArgumentNotNull(repository, nameof(repository));
     Guard.ArgumentNotNull(mapper, nameof(mapper));
     _repository = repository;
     _mapper     = mapper;
 }
예제 #27
0
        public CompaniesController(IHttpContextAccessor accessor)
        {
            _accessor = accessor;

            _readRepository  = DocumentDatabase.GetReadRepository <Company>();
            _writeRepository = DocumentDatabase.GetWriteRepository <Company>();
        }
예제 #28
0
 public ProjectController(IProjectRepository projectrepo, IBaseRepository baserepo, IReadRepository <WTTESTEQUIPMENT> wtequipmentrepo, IReadRepository <WTTESTINFO> wttestinforepo)
 {
     projectrepository    = projectrepo;
     baserepository       = baserepo;
     this.wtequipmentrepo = wtequipmentrepo;
     this.wttestinforepo  = wttestinforepo;
 }
예제 #29
0
 public ArticlesController(IReadRepository readRepository, IEventRepository repository,
                           ICheckpointPersister checkpointPersister)
 {
     this.readRepository      = readRepository ?? throw new ArgumentNullException(nameof(readRepository));
     this.repository          = repository ?? throw new ArgumentNullException(nameof(repository));
     this.checkpointPersister = checkpointPersister ?? throw new ArgumentNullException(nameof(checkpointPersister));
 }
예제 #30
0
 public BaseRepository(DbContext dbContext)
 {
     this.CreateRepository = new CreateRepository <T>(dbContext);
     this.UpdateRepository = new UpdateRepository <T>(dbContext);
     this.DeleteRepository = new DeleteRepository <T>(dbContext);
     this.ReadRepository   = new ReadRepository <T>(dbContext);
 }
예제 #31
0
 public BlogPostService(
     IReadRepository <BlogPost> readRepository,
     IWriteRepository <BlogPost> writeRepository)
 {
     _readRepository  = readRepository;
     _writeRepository = writeRepository;
 }
예제 #32
0
 public HomeController(IReadRepository ReadRepository,
     IUserProfileRepository UserProfileRepository,
     IPraiseRepository PraiseRepository)
 {
     this.UserProfileRepository = UserProfileRepository;
     this.ReadRepository = ReadRepository;
     this.PraiseRepository = PraiseRepository;
 }
예제 #33
0
 static ServiceLocator()
 {
     if (IsInitialized) return;
     lock (LockThis)
     {
         ContainerBootstrapper.BootstrapStructureMap();
         _commandBus = ObjectFactory.GetInstance<ICommandBus>();
         _readModel = ObjectFactory.GetInstance<IReadRepository>();
         IsInitialized = true;
     }
 }
예제 #34
0
 public IssueTypeBusiness(IReadRepository readRepository, IUserAccessBusiness userAccessBusiness)
 {
     _readRepository = readRepository;
     _userAccessBusiness = userAccessBusiness;
 }
예제 #35
0
 public VersionBusiness(IRepository repository, IReadRepository readRepository, IUserAccessBusiness userAccessBusiness)
 {
     _repository = repository;
     _readRepository = readRepository;
     _userAccessBusiness = userAccessBusiness;
 }
예제 #36
0
 public UserAccessBusiness(IReadRepository readRepository)
 {
     _readRepository = readRepository;
 }
예제 #37
0
 public DashboardBusiness(IRepository repository, IReadRepository readRepository)
 {
     _repository = repository;
     _readRepository = readRepository;
 }
 public CustomerDetailsOverviewViewModel(IReadRepository readRepository)
 {
     _readRepository = readRepository;
 }
예제 #39
0
		public CustomerListViewModel(IReadRepository repository, IEventAggregator eventAggregator)
		{
			_repository = repository;
			_eventAggregator = eventAggregator;
		}
예제 #40
0
 public CourseController(IReadRepository repository, ICommandService commandService)
 {
     _repository = repository;
     _commandService = commandService;
 }