Class DatabaseVersionValidator
Validates the database version against the supported assembly version.
Inheritance
System.Object
DatabaseVersionValidator
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Commerce
Assembly: EPiServer.Business.Commerce.dll
Version: 12.17.2Syntax
[Obsolete("This class supports implementaitons of the obsolete IDatabaseSchemaUpdater interface. Those implementations are superseded by internal ISchemaUpdater implementations.")]
public class DatabaseVersionValidator
Constructors
DatabaseVersionValidator(IDatabaseFactory, ScriptExecutor, IConnectionStringHandler)
Initializes a new instance of the DatabaseVersionValidator class.
Declaration
public DatabaseVersionValidator(IDatabaseFactory databaseFactory, ScriptExecutor scriptExecutor, IConnectionStringHandler connectionHandler)
Parameters
| Type | Name | Description |
|---|---|---|
| EPiServer.Data.Providers.IDatabaseFactory | databaseFactory | The database handler. |
| EPiServer.Data.SchemaUpdates.ScriptExecutor | scriptExecutor | The script executor. |
| IConnectionStringHandler | connectionHandler | The connection handler, which contains connection string to both CMS and Commerce database. |
Fields
DatabaseFactory
Declaration
protected readonly IDatabaseFactory DatabaseFactory
Field Value
| Type | Description |
|---|---|
| EPiServer.Data.Providers.IDatabaseFactory |
Properties
ConnectionHandler
Gets the connection string handler, which contains connection string to both CMS and Commerce database.
Declaration
protected IConnectionStringHandler ConnectionHandler { get; }
Property Value
| Type | Description |
|---|---|
| IConnectionStringHandler |
ScriptExecutor
The Script Executor
Declaration
protected ScriptExecutor ScriptExecutor { get; }
Property Value
| Type | Description |
|---|---|
| EPiServer.Data.SchemaUpdates.ScriptExecutor |
Methods
GetDatabaseVersion()
Gets the database version.
Declaration
public virtual Version GetDatabaseVersion()
Returns
| Type | Description |
|---|---|
| System.Version |
Exceptions
| Type | Condition |
|---|---|
| EPiServer.Core.EPiServerException | The stored procedure 'GetContentSchemaVersionNumber' could not return the latest schema version number. |
GetSupportedVersion()
Gets the supported version for the assembly.
Declaration
public virtual Version GetSupportedVersion()
Returns
| Type | Description |
|---|---|
| System.Version |