Example #1
0
        private void Setup()
        {
            var options = new DbContextOptionsBuilder <GiftAidDbContext>()
                          .UseInMemoryDatabase(databaseName: "GiftAidDb").Options;

            _dbContext          = new GiftAidDbContext(options);
            _calculationService = new GiftAidCalculationService();
            _declarationService = new DeclarationService(_calculationService);
        }
 public GiftAidRepository(GiftAidDbContext dbContext)
 {
     _dbContext = dbContext ?? throw new ArgumentNullException(nameof(_dbContext));
 }