private void ConfigureDbContext()
        {
            var options = new DbContextOptionsBuilder <OpenWeatherContext>()
                          .UseInMemoryDatabase("weather_db")
                          .Options;

            _context = new OpenWeatherContext(options, GetInstance <IMediatorHandler>());
            _context.Database.EnsureCreated();
        }
示例#2
0
 public Repository(OpenWeatherContext context)
 {
     _context = context;
     _entity  = context.Set <TEntity>();
 }
示例#3
0
 public HistoricWeatherRepository(OpenWeatherContext context) : base(context)
 {
 }