public CoreBankingService( OnePayContext context, IUserService userService , IAccountsService accountsService , IBusinessProductService businessProductService , IMessagingService messagingService , ITransactionService transactionService ) { _context = context; _userService = userService; _accountsService = accountsService; _businessProductService = businessProductService; _transactionService = transactionService; _messagingService = messagingService; }
public OnePayTest() { //Context preperation configuration = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appSettings.json") .Build(); string connectionString = configuration.GetConnectionString("DefaultConnection"); var dbOptions = new DbContextOptionsBuilder <OnePayContext>().UseSqlServer(connectionString).Options; onePayContext = new OnePayContext(dbOptions); //Initialize mapper var mappings = new MapperConfigurationExpression(); mappings.AddProfile <AutoMapperProfile>(); Mapper.Initialize(mappings); IUserService userService = new UserService(onePayContext); usersController = new UsersController(userService, Mapper.Instance); IAccountsService accountsService = new AccountsService(onePayContext); userAccountsController = new UserAccountsController(accountsService, userService, Mapper.Instance); IBusinessProductService businessProductService = new BusinessProductService(onePayContext); businessProductsController = new BusinessProductsController(businessProductService, userService, Mapper.Instance); ITransactionService transactionService = new TransactionService(onePayContext); onePayTransactionsController = new OnePayTransactionsController(transactionService, userService, Mapper.Instance); IOnePayService onePayService = new OnePayService(onePayContext, businessProductService, userService); IMessagingService messagingService = new MessagingService(onePayContext); ICoreBankingService coreBankingService = new CoreBankingService(onePayContext, userService, accountsService, businessProductService, messagingService, transactionService); onePayController = new OnePayController(transactionService, userService, onePayService, coreBankingService, Mapper.Instance); Startup.APIKEY = configuration["APIKEYs:TextLocal"]; Startup.APIURL = configuration["APIURLs:TextLocalUrl"]; }
public OnePay(OnePayContext context) { _context = context; }
public TransactionService(OnePayContext context) { _context = context; }
public UserService(OnePayContext context) { _context = context; }
public AccountsService(OnePayContext context) { _context = context; }
public OnePayService(OnePayContext context, IBusinessProductService businessProductService, IUserService userService) { _context = context; _businessProductService = businessProductService; _userService = userService; }
public BusinessProductService(OnePayContext context) { _context = context; }
public MessagingService(OnePayContext context) { _context = context; }