Пример #1
0
        public RquestQueryHandlers()
        {
            ContextOptions = new DbContextOptionsBuilder <OmopContext>()
                             .UseInMemoryDatabase("db")
                             .Options;

            Seed();

            _testContext = new OmopContext(ContextOptions);
            _sut         = new(_testContext);
        }
Пример #2
0
        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 }
            });
Пример #3
0
 public RquestOmopQueryService(OmopContext db)
 {
     _db = db;
 }