private TestFactoty() { MongoRepositoriesBundle bundle = new MongoRepositoriesBundle("mongodb://localhost:27017", "HhbTest"); var fundRepository = new MongoFundRepository(bundle, TransactionRepository); FundRepository = fundRepository; var transactionTypeRepository = new MongoTransactionTypeRepository(bundle); TransactionTypeRepository = transactionTypeRepository; var transactionRepository = new MongoTransactionRepository(bundle, TransactionTypeRepository); TransactionRepository = transactionRepository; }
private AppFactoty() { MongoRepositoriesBundle bundle = new MongoRepositoriesBundle("mongodb://localhost:27017", "householdbudget"); var transctionTypeRepository = new MongoTransactionTypeRepository(bundle); TransctionTypeRepository = transctionTypeRepository; var transactionRepository = new MongoTransactionRepository( bundle, TransctionTypeRepository); TransactionRepository = transactionRepository; var fundRepository = new MongoFundRepository(bundle, TransactionRepository); FundRepository = fundRepository; var transactionRouteRepository = new MongoTransactionRouteRepository( bundle, TransactionRepository, FundRepository); TransactionRouteRepository = transactionRouteRepository; var transactionService = new TransactionService(TransactionRepository); TransactionService = transactionService; var fundService = new FundSevice(FundRepository, TransactionService); FundService = fundService; var transactionRouteEditService = new TransactionRouteService(transactionRouteRepository); TransactionRouteEditService = transactionRouteEditService; }