Exemplo n.º 1
0
        public void Init()
        {
            _options = TestDbOptions.GetInMemoryOptions <SettingsContext>();
            var context = new SettingsContext(_options);

            context.Database.EnsureDeleted();
            context.Database.EnsureCreated();
            _iqcareEmr = new EmrSystem("IQCare", "v1");
            _iqcareEmr.AddProtocol(new DatabaseProtocol(DatabaseType.MicrosoftSQL, @".\koske14", "sa", "maun", "iqcare"));
            _iqcareEmr.AddRestProtocol(new RestProtocol("http://192.168.1.10/api", "xys"));
            context.Add(_iqcareEmr);
            context.SaveChanges();
        }
Exemplo n.º 2
0
        public void Init()
        {
            _options = TestDbOptions.GetInMemoryOptions <SettingsContext>();
            var context = new SettingsContext(_options);

            context.Database.EnsureDeleted();
            context.Database.EnsureCreated();
            _iqcareEmr = new EmrSystem("IQCare", "v1");
            _iqcareEmr.AddProtocol(new DatabaseProtocol(DatabaseType.MicrosoftSQL, @".\koske14", "sa", "maun", "iqcare"));
            _kenyaEmr = new EmrSystem("KenyaEMR", "v1");
            _kenyaEmr.AddProtocol(new DatabaseProtocol(DatabaseType.MySQL, @"localhost", "root", "root", "openmrs"));
            _otherEmr = new EmrSystem("xEmr", "1");
            _otherEmr.AddProtocol(new DatabaseProtocol(DatabaseType.MySQL, @"localhost", "root", "root", "otheropenmrs"));
            context.AddRange(new List <EmrSystem> {
                _iqcareEmr, _kenyaEmr, _otherEmr
            });
            context.SaveChanges();
        }