C# 클래스 MonoSoftware.MonoX.DAL.DatabaseSpecific.DataAccessAdapter

Data access adapter class, which controls the complete database interaction with the database for all objects.
Use a DataAccessAdapter object solely per thread, and per connection. A DataAccessAdapter object contains 1 active connection and no thread-access scheduling code. This means that you need to create a new DataAccessAdapter object if you want to utilize in another thread a new connection and a new transaction or want to open a new connection.
상속: DataAccessAdapterBase
파일 보기 프로젝트 열기: MonoSoftware/MonoX-Data-Access-Layer 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
ConnectionStringKeyName string

공개 메소드들

메소드 설명
DataAccessAdapter ( ) : System

CTor

DataAccessAdapter ( bool keepConnectionOpen ) : System

CTor

DataAccessAdapter ( string connectionString ) : System

CTor

DataAccessAdapter ( string connectionString, bool keepConnectionOpen ) : System

CTor

DataAccessAdapter ( string connectionString, bool keepConnectionOpen, CatalogNameOverwriteHashtable catalogNameOverwrites, SchemaNameOverwriteHashtable schemaNameOverwrites ) : System

CTor.

DataAccessAdapter ( string connectionString, bool keepConnectionOpen, CatalogNameUsage catalogNameUsageSetting, string catalogNameToUse ) : System

CTor.

For backwards compatibility.

DataAccessAdapter ( string connectionString, bool keepConnectionOpen, SchemaNameUsage schemaNameUsageSetting, string schemaNameToUse ) : System

CTor

SetArithAbortFlag ( bool value ) : void

Sets the flag to signal the SqlServer DQE to generate SET ARITHABORT ON statements prior to INSERT, DELETE and UPDATE Queries. Keep this flag to false in normal usage, but set it to true if you need to write into a table which is part of an indexed view. It will not affect normal inserts/updates that much, leaving it on is not harmful. See Books online for details on SET ARITHABORT ON. After each statement the setting is turned off if it has been turned on prior to that statement.

Setting this flag is a global change.

SetSqlServerCompatibilityLevel ( SqlServerCompatibilityLevel compatibilityLevel ) : void

Sets the default compatibility level used by the DQE. Default is SqlServer2005. This is a global setting. Compatibility level influences the query generated for paging, sequence name (@@IDENTITY/SCOPE_IDENTITY()), and usage of newsequenceid() in inserts. It also influences the ado.net provider to use. This way you can switch between SqlServer server client 'SqlClient' and SqlServer CE Desktop.

Setting this property will overrule a similar setting in the .config file. Don't set this property when queries are executed as it might switch factories for ADO.NET elements which could result in undefined behavior so set this property at startup of your application

보호된 메소드들

메소드 설명
CreateDynamicQueryEngine ( ) : DynamicQueryEngineBase

Creates a new Dynamic Query engine object and passes in the defined catalog/schema overwrite hashtables.

SetPerInstanceCompatibilityLevel ( DynamicQueryEngineBase dqe ) : void

Sets the per instance compatibility level on the dqe instance specified.

비공개 메소드들

메소드 설명
ReadConnectionStringFromConfig ( ) : string

Reads the value of the setting with the key ConnectionStringKeyName from the *.config file and stores that value as the active connection string to use for this object.

메소드 상세

CreateDynamicQueryEngine() 보호된 메소드

Creates a new Dynamic Query engine object and passes in the defined catalog/schema overwrite hashtables.
protected CreateDynamicQueryEngine ( ) : DynamicQueryEngineBase
리턴 DynamicQueryEngineBase

DataAccessAdapter() 공개 메소드

CTor
public DataAccessAdapter ( ) : System
리턴 System

DataAccessAdapter() 공개 메소드

CTor
public DataAccessAdapter ( bool keepConnectionOpen ) : System
keepConnectionOpen bool when true, the DataAccessAdapter will not close an opened connection. Use this for multi action usage.
리턴 System

DataAccessAdapter() 공개 메소드

CTor
public DataAccessAdapter ( string connectionString ) : System
connectionString string The connection string to use when connecting to the database.
리턴 System

DataAccessAdapter() 공개 메소드

CTor
public DataAccessAdapter ( string connectionString, bool keepConnectionOpen ) : System
connectionString string The connection string to use when connecting to the database.
keepConnectionOpen bool when true, the DataAccessAdapter will not close an opened connection. Use this for multi action usage.
리턴 System

DataAccessAdapter() 공개 메소드

CTor.
public DataAccessAdapter ( string connectionString, bool keepConnectionOpen, CatalogNameOverwriteHashtable catalogNameOverwrites, SchemaNameOverwriteHashtable schemaNameOverwrites ) : System
connectionString string The connection string to use when connecting to the database.
keepConnectionOpen bool when true, the DataAccessAdapter will not close an opened connection. Use this for multi action usage.
catalogNameOverwrites CatalogNameOverwriteHashtable The from-to name value pairs and setting for the overwriting of catalog names. Can be null.
schemaNameOverwrites SchemaNameOverwriteHashtable The from-to name value pairs and setting for the overwriting of schema names. Can be null.
리턴 System

DataAccessAdapter() 공개 메소드

CTor.
For backwards compatibility.
public DataAccessAdapter ( string connectionString, bool keepConnectionOpen, CatalogNameUsage catalogNameUsageSetting, string catalogNameToUse ) : System
connectionString string The connection string to use when connecting to the database.
keepConnectionOpen bool when true, the DataAccessAdapter will not close an opened connection. Use this for multi action usage.
catalogNameUsageSetting CatalogNameUsage Configures this data access adapter object how to threat catalog names in persistence information.
catalogNameToUse string The name to use if catalogNameUsageSetting is set to ForceName. Ignored otherwise.
리턴 System

DataAccessAdapter() 공개 메소드

CTor
public DataAccessAdapter ( string connectionString, bool keepConnectionOpen, SchemaNameUsage schemaNameUsageSetting, string schemaNameToUse ) : System
connectionString string The connection string to use when connecting to the database.
keepConnectionOpen bool when true, the DataAccessAdapter will not close an opened connection. Use this for multi action usage.
schemaNameUsageSetting SchemaNameUsage Configures this data access adapter object how to threat schema names in persistence information.
schemaNameToUse string Oracle specific. The name to use if schemaNameUsageSetting is set to ForceName. Ignored otherwise.
리턴 System

SetArithAbortFlag() 공개 정적인 메소드

Sets the flag to signal the SqlServer DQE to generate SET ARITHABORT ON statements prior to INSERT, DELETE and UPDATE Queries. Keep this flag to false in normal usage, but set it to true if you need to write into a table which is part of an indexed view. It will not affect normal inserts/updates that much, leaving it on is not harmful. See Books online for details on SET ARITHABORT ON. After each statement the setting is turned off if it has been turned on prior to that statement.
Setting this flag is a global change.
public static SetArithAbortFlag ( bool value ) : void
value bool
리턴 void

SetPerInstanceCompatibilityLevel() 보호된 메소드

Sets the per instance compatibility level on the dqe instance specified.
protected SetPerInstanceCompatibilityLevel ( DynamicQueryEngineBase dqe ) : void
dqe DynamicQueryEngineBase The dqe.
리턴 void

SetSqlServerCompatibilityLevel() 공개 정적인 메소드

Sets the default compatibility level used by the DQE. Default is SqlServer2005. This is a global setting. Compatibility level influences the query generated for paging, sequence name (@@IDENTITY/SCOPE_IDENTITY()), and usage of newsequenceid() in inserts. It also influences the ado.net provider to use. This way you can switch between SqlServer server client 'SqlClient' and SqlServer CE Desktop.
Setting this property will overrule a similar setting in the .config file. Don't set this property when queries are executed as it might switch factories for ADO.NET elements which could result in undefined behavior so set this property at startup of your application
public static SetSqlServerCompatibilityLevel ( SqlServerCompatibilityLevel compatibilityLevel ) : void
compatibilityLevel SqlServerCompatibilityLevel
리턴 void

프로퍼티 상세

ConnectionStringKeyName 공개적으로 정적으로 프로퍼티

The name of the key in the *.config file of the executing application which contains the connection string.
Default: the value set in the LLBLGen Pro project properties
public static string ConnectionStringKeyName
리턴 string