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); }
public LeaserController(IOptions <RoomForRentOptions> optionsAccessor, IRepositoryWrapper repositoryWrapper) { this.repositoryWrapper = repositoryWrapper; leaserService = new LeaserService(this.repositoryWrapper.LeaserRepository); transactionService = new RenterLeaserTransactionService(this.repositoryWrapper); this.optionsAccessor = optionsAccessor; TransactionRepository = this.repositoryWrapper.TransactionRepository; this.ItemsPerPage = this.optionsAccessor.Value.ItemsPerPage; }