public RquestQueryHandlers() { ContextOptions = new DbContextOptionsBuilder <OmopContext>() .UseInMemoryDatabase("db") .Options; Seed(); _testContext = new OmopContext(ContextOptions); _sut = new(_testContext); }
private void Seed() { using var db = new OmopContext(ContextOptions); db.Database.EnsureDeleted(); db.Database.EnsureCreated(); List <Person> people = new() { new() { Id = 1 }, new() { Id = 2 }, new() { Id = 3 }, new() { Id = 4 }, new() { Id = 5 }, }; people[0].ConditionOccurrences.AddRange(new List <ConditionOccurrence> { new() { Id = 1, ConceptId = 1 } });
public RquestOmopQueryService(OmopContext db) { _db = db; }