Example #1
0
        public void RefreshDbContext(string connectionString)
        {
            if (Context != null)
            {
                Context.Dispose();
            }
            var optionsBuilder = new DbContextOptionsBuilder <DWDbContext>();

            optionsBuilder.UseSqlServer(connectionString);
            Context = new DWDbContext(optionsBuilder.Options);
        }
Example #2
0
 public DWRepository(DWDbContext dwcontext)
 {
     this.Context = dwcontext;
 }