Interface IDatabaseSchemaValidator

Signature for component that want to interact when an automatic database schema update is to be executed.

Namespace: EPiServer.Data.SchemaUpdates
Assembly: EPiServer.Data.dll
Version: 8.11.0
Syntax
public interface IDatabaseSchemaValidator

Methods

BeforeUpdating(ConnectionStringSettings)

Called if IsDatabaseUpdateAllowed(ConnectionStringSettings) returns true. If any action is needed before database update it can be done here.

Declaration
void BeforeUpdating(ConnectionStringSettings connectionStringSettings)
Parameters
Type Name Description
System.Configuration.ConnectionStringSettings connectionStringSettings

The connection string settings for the database that will get a schema update.

IsDatabaseUpdateAllowed(ConnectionStringSettings)

Called when need for a database schema update is detected.

Declaration
bool IsDatabaseUpdateAllowed(ConnectionStringSettings connectionStringSettings)
Parameters
Type Name Description
System.Configuration.ConnectionStringSettings connectionStringSettings

The connection string settings for the database that needs schema update.

Returns
Type Description
System.Boolean

true if automatic update should be performed else false.

Extension Methods