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

                InterceptorChecker.Reset();
            }
예제 #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();
            }
예제 #3
0
 public void Dispose()
 {
     preserveChanges = false;
     PopulateData();
     InterceptorChecker.Reset();
 }
예제 #4
0
 public ChangeScope()
 {
     InterceptorChecker.Reset();
 }