Example #1
0
        public void Setup()
        {
            DbContextOptions <BCrediDbContext> options = new DbContextOptionsBuilder <BCrediDbContext>()
                                                         .UseInMemoryDatabase(databaseName: "InMemoryDatabase")
                                                         .Options;

            _context = new BCrediDbContext(options);

            IContractRepository contractRepository = new ContractRepository(new BCrediDbContext(options));

            _bLContract = new BLContract(contractRepository, _emailSender);
        }
 public ContractRepository(BCrediDbContext context)
 {
     _context = context;
 }