Beispiel #1
0
            void IDisposable.Dispose()
            {
                NorthwindDefaultTempDbService.ContextConnectionString = savedConnectionString;
                TestUtil.ClearMetadataCache();
                System.Data.Metadata.Edm.MetadataWorkspace.ClearCache();
                disposeNorthwind.Dispose();

                InterceptorChecker.Reset();
            }
Beispiel #2
0
            public RestoreNorthwindConectionString(string metadataString)
            {
                savedConnectionString = NorthwindDefaultTempDbService.ContextConnectionString;

                SqlConnectionStringBuilder sqlBuilder = new SqlConnectionStringBuilder();

                sqlBuilder.DataSource               = DataUtil.DefaultDataSource;
                sqlBuilder.IntegratedSecurity       = true;
                sqlBuilder.MultipleActiveResultSets = true;
                sqlBuilder.ConnectTimeout           = 600;

                var entityBuilder = new EntityConnectionStringBuilder();

                entityBuilder.Metadata = metadataString;
                entityBuilder.Provider = "System.Data.SqlClient";
                entityBuilder.ProviderConnectionString = sqlBuilder.ConnectionString;

                NorthwindDefaultTempDbService.ContextConnectionString = entityBuilder.ConnectionString;
                System.Data.Metadata.Edm.MetadataWorkspace.ClearCache();
                TestUtil.ClearMetadataCache();
                disposeNorthwind = NorthwindDefaultTempDbService.SetupNorthwind();

                InterceptorChecker.Reset();
            }
Beispiel #3
0
 public void Dispose()
 {
     preserveChanges = false;
     PopulateData();
     InterceptorChecker.Reset();
 }
Beispiel #4
0
 public ChangeScope()
 {
     InterceptorChecker.Reset();
 }