Class ScriptExecutor
Run update scripts from either an assembly or a stream using a specified connection string
Inheritance
System.Object
ScriptExecutor
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.Data.SchemaUpdates
Assembly: EPiServer.Data.dll
Version: 11.20.7Syntax
public abstract class ScriptExecutor
Constructors
ScriptExecutor()
Declaration
protected ScriptExecutor()
Properties
OrderScriptsByVersion
Gets or sets if scripts are named as version and should be executed in this order. Default is true.
Declaration
public bool OrderScriptsByVersion { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
ExecuteEmbeddedZippedScripts(String, Assembly, String)
Call to execute sql updatescripts that are zipped as an embedded resource.
Declaration
public abstract void ExecuteEmbeddedZippedScripts(string connectionString, Assembly assembly, string resourcePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionString | The connection string to the database where the scripts should be executed on. |
System.Reflection.Assembly | assembly | The assembly containing the embedded resource. |
System.String | resourcePath | The path/name of the embedded resource within the assembly. |
ExecuteScript(String, Stream)
Call to execute the sql statements contained in the stream against the database given by connectionString
Declaration
public abstract void ExecuteScript(string connectionString, Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionString | The connection string to the database that the script should be executed on. |
System.IO.Stream | stream | A stream containing the sql statements to execute. |