You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Darren Comeau edited this page Oct 14, 2018
·
3 revisions
HasSchema(String)
Return true if the schema exists within the database.
Overloads
publicboolHasSchema(stringschemaName);
HasSchema(string schemaName)
Parameters
schemaName String
The database schema which we want to check for the presence of.
Examples
// Setup the Database Tester object using the MS SQL implementationvarconnectionstring=@"Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=tempdb;Integrated Security=SSPI;";VulcanAnalytics.DBTester.DatabaseTestertester=newVulcanAnalytics.DBTester.MsSqlDatabaseTester(connectionstring);// Parameters for HasSchema methodvarschemaName="dbo";// Call the HasSchema method to check presence of schemavarhasSchema=tester.HasSchema(schemaName);Assert.IsTrue(hasSchema);
Remarks
Applicable for MS SQL, might not be applicable in all database implementations.