void IDisposable.Dispose() { NorthwindDefaultTempDbService.ContextConnectionString = savedConnectionString; TestUtil.ClearMetadataCache(); System.Data.Metadata.Edm.MetadataWorkspace.ClearCache(); disposeNorthwind.Dispose(); InterceptorChecker.Reset(); }
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(); }
public void Dispose() { preserveChanges = false; PopulateData(); InterceptorChecker.Reset(); }
public ChangeScope() { InterceptorChecker.Reset(); }