Example #1
0
        public void Configuration(IAppBuilder app)
        {
            app.CreatePerOwinContext <EMRContext>(() => EMRContext.Create());
            app.CreatePerOwinContext <AppUserManager>(AppUserManager.Create);

            app.UseCookieAuthentication(new CookieAuthenticationOptions
            {
                AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
                LoginPath          = new PathString("/Login/SignIn"),
            });
        }
        public void SetUp()
        {
            _context          = new EMRContext(_options);
            _configRepository = new ConfigRepository(_context);

            _testUser     = new User("MauntestMaun");
            _testGroup    = new Group("MaungroupMaun");
            _testGroupNew = new Group("MaungroupMaunNEW");
            _featureIds   = _context.Features.Where(x => x.DeleteFlag == 0).Take(2).Select(x => x.FeatureID).ToList();
            _userIds      = _context.Users.Where(x => x.DeleteFlag == 0).Select(x => x.UserId).ToList();
            _context.Add(_testUser);
            _context.Add(_testGroup);
            _context.SaveChanges();
        }
        public void Init()
        {
            var config = new ConfigurationBuilder()
                         .AddJsonFile("appsettings.json")
                         .Build();
            var connectionString = config["connectionStrings:EMRConnection"];

            _options = new DbContextOptionsBuilder <EMRContext>()
                       .UseSqlServer(connectionString)
                       .Options;

            var context = new EMRContext(_options);

            context.ApplyMigrations();
            context.UpdateTranslations();
        }
Example #4
0
 protected BaseRepository(EMRContext context)
 {
     Context = context;
 }
Example #5
0
 public CommonRepository(IHMSContext context, EMRContext emrContext = null) : base(context)
 {
     _context    = context;
     _emrContext = emrContext;
 }
Example #6
0
 public KlassRepository(EMRContext context)
 {
     db = context;
 }
Example #7
0
 public ConfigRepository(EMRContext context) : base(context)
 {
 }
Example #8
0
 public EmrRepository()
 {
     _emrContext = new EMRContext();
 }
Example #9
0
 public CrmPersonRepository(EMRContext context)
 {
     db = context;
 }
Example #10
0
 public PStoreRepository(EMRContext context) : base(context)
 {
 }