예제 #1
0
        public RepositoryWrapper(RoomForRentDbContext dbContext)
        {
            this.dbContext = dbContext;

            this.renterRepository      = new EfRenterRepository(dbContext);
            this.leaserRepository      = new EfLeaserRepository(dbContext);
            this.transactionRepository = new EfRenterLeaserTransactionRepository(dbContext, renterRepository, leaserRepository);
        }
        public EfRenterLeaserTransactionRepository(
            RoomForRentDbContext roomForRentDbContext,
            IRenterRepository renterRepository,
            ILeaserRepository leaserRepository
            )
        {
            this.roomForRentDbContext = roomForRentDbContext;

            this.RenterRepository = renterRepository;
            this.LeaserRepository = leaserRepository;
        }
        public RenterLeaserTransactionService(IRepositoryWrapper repositoryWrapper)
        {
            this.repositoryWrapper     = repositoryWrapper;
            this.transactionRepository = this.repositoryWrapper.TransactionRepository;

            this.renterRepository = repositoryWrapper.RenterRepository;
            this.leaserRepository = repositoryWrapper.LeaserRepository;

            this.leaserService = new LeaserService(this.leaserRepository);
            this.renterService = new RenterService(this.renterRepository);
        }
예제 #4
0
 public LeaserService(ILeaserRepository leaserRepository)
 {
     this.leaserRepository = leaserRepository;
 }