public AgroVisionDbRepositoryTests()
        {
            var options = new DbContextOptionsBuilder <AgroVisionDbContext>()
                          .UseInMemoryDatabase(databaseName: "SprayingDosageCalculator")
                          .Options;

            dbContext = new AgroVisionDbContext(options);
            _mapper   = new AgroVisionMapper();
            _agroVisionDbRepository = new AgroVisionDbRepository(dbContext, _mapper);
        }
Example #2
0
 public AgroVisionDbRepository(AgroVisionDbContext dbContext, IAgroVisionMapper <IMapper> mapper)
 {
     _dbContext = dbContext;
     _mapper    = mapper.CreateMapper();
 }