protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { var sqlConnectionStringBuilder = new SqlConnectionStringBuilder { DataSource = "10.0.2.229", InitialCatalog = "Heap_Record", UserID = "sa", Password = "******" }; optionsBuilder.UseSqlServer(sqlConnectionStringBuilder.ConnectionString); optionsBuilder.EnableWithChangeTracingContext(); base.OnConfiguring(optionsBuilder); }