Class SqlContext
Represents the sql connection information, either valid connection string for a SqlConnection or SqlTransaction.
Inheritance
System.Object
SqlContext
Implements
System.IDisposable
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: Mediachase.FileUploader
Assembly: Mediachase.FileUploader.dll
Version: 10.8.0Syntax
public class SqlContext : IDisposable
Constructors
SqlContext()
Initializes a new instance of the SqlContext.
Declaration
public SqlContext()
SqlContext(String)
Initializes a new instance of the SqlContext class with valid connection string for a SqlConnection.
Declaration
public SqlContext(string ConnectionString)
Parameters
Type | Name | Description |
---|---|---|
System.String | ConnectionString |
Properties
ConnectionString
Gets or sets the connection string for a SqlConnection.
Declaration
public virtual string ConnectionString { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Transaction
Gets or sets the SqlTransaction.
Declaration
public virtual SqlTransaction Transaction { get; set; }
Property Value
Type | Description |
---|---|
System.Data.SqlClient.SqlTransaction |
Methods
BeginTransaction()
Begins a new database transaction.
Declaration
public virtual void BeginTransaction()
Commit()
Commits the database transaction.
Declaration
public virtual void Commit()
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Dispose(Boolean)
Disposes the specified clean up managed and native resources.
Declaration
protected virtual void Dispose(bool cleanUpManagedAndNativeResources)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | cleanUpManagedAndNativeResources | if set to |
Rollback()
Roll back the database transaction from a pending state.
Declaration
public virtual void Rollback()
Implements
System.IDisposable