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); }
public LeaserService(ILeaserRepository leaserRepository) { this.leaserRepository = leaserRepository; }