C# 클래스 Passive.DynamicDatabase

A class that wraps your database in Dynamic Funtime
파일 보기 프로젝트 열기: Talljoe/Passive 1 사용 예제들

공개 메소드들

메소드 설명
DynamicDatabase ( ) : System

Initializes a new instance of the DynamicDatabase class.

DynamicDatabase ( DatabaseDialect dialect, string connectionStringName = "" ) : System

Initializes a new instance of the DynamicDatabase class.

DynamicDatabase ( DatabaseDialect dialect, string connectionString, string providerName ) : System

Initializes a new instance of the DynamicDatabase class.

DynamicDatabase ( string connectionStringName ) : System

Initializes a new instance of the DynamicDatabase class.

DynamicDatabase ( string connectionStringName, IEnumerable databaseDetectors ) : System

Initializes a new instance of the DynamicDatabase class.

DynamicDatabase ( string connectionString, string providerName ) : System

Initializes a new instance of the DynamicDatabase class.

DynamicDatabase ( string connectionString, string providerName, IEnumerable databaseDetectors ) : System

Initializes a new instance of the DynamicDatabase class.

Execute ( ) : int

Executes a series of DBCommands

Execute ( IEnumerable commands, bool transaction = false ) : int

Executes a series of DBCommands optionally in a transaction

Execute ( string sql ) : int

Executes a single DBCommand

ExecuteTransaction ( ) : int

Executes a series of DBCommands in a transaction

Fetch ( DynamicCommand command ) : IList

Runs a query against the database.

Fetch ( string sql ) : IList

Runs a query against the database.

GetTable ( string tableName, string primaryKeyField = "" ) : DynamicModel

Gets a table in the database.

OpenConnection ( ) : DbConnection

Returns a database connection.

Query ( DynamicCommand command ) : IEnumerable

Enumerates the reader yielding the results

Query ( string sql ) : IEnumerable

Enumerates the reader yielding the result

Scalar ( DynamicCommand command ) : object

Returns a single result

Scalar ( string sql ) : object

Returns a single result

비공개 메소드들

메소드 설명
CreateDbCommand ( DynamicCommand command, DbTransaction tx = null, DbConnection connection = null ) : DbCommand
Initialize ( string connectionString, string providerName, IEnumerable databaseDetectors = null ) : void

메소드 상세

DynamicDatabase() 공개 메소드

Initializes a new instance of the DynamicDatabase class.
public DynamicDatabase ( ) : System
리턴 System

DynamicDatabase() 공개 메소드

Initializes a new instance of the DynamicDatabase class.
public DynamicDatabase ( DatabaseDialect dialect, string connectionStringName = "" ) : System
dialect Passive.Dialect.DatabaseDialect The dialect.
connectionStringName string Name of the connection string.
리턴 System

DynamicDatabase() 공개 메소드

Initializes a new instance of the DynamicDatabase class.
public DynamicDatabase ( DatabaseDialect dialect, string connectionString, string providerName ) : System
dialect Passive.Dialect.DatabaseDialect The dialect.
connectionString string Database connection string
providerName string Invariant name of the database provider
리턴 System

DynamicDatabase() 공개 메소드

Initializes a new instance of the DynamicDatabase class.
public DynamicDatabase ( string connectionStringName ) : System
connectionStringName string Name of the connection string.
리턴 System

DynamicDatabase() 공개 메소드

Initializes a new instance of the DynamicDatabase class.
public DynamicDatabase ( string connectionStringName, IEnumerable databaseDetectors ) : System
connectionStringName string Name of the connection string.
databaseDetectors IEnumerable Classes used to probe the database.
리턴 System

DynamicDatabase() 공개 메소드

Initializes a new instance of the DynamicDatabase class.
public DynamicDatabase ( string connectionString, string providerName ) : System
connectionString string Database connection string
providerName string Invariant name of the database provider
리턴 System

DynamicDatabase() 공개 메소드

Initializes a new instance of the DynamicDatabase class.
public DynamicDatabase ( string connectionString, string providerName, IEnumerable databaseDetectors ) : System
connectionString string Database connection string
providerName string Invariant name of the database provider
databaseDetectors IEnumerable Classes used to probe the database.
리턴 System

Execute() 공개 메소드

Executes a series of DBCommands
public Execute ( ) : int
리턴 int

Execute() 공개 메소드

Executes a series of DBCommands optionally in a transaction
public Execute ( IEnumerable commands, bool transaction = false ) : int
commands IEnumerable
transaction bool
리턴 int

Execute() 공개 메소드

Executes a single DBCommand
public Execute ( string sql ) : int
sql string
리턴 int

ExecuteTransaction() 공개 메소드

Executes a series of DBCommands in a transaction
public ExecuteTransaction ( ) : int
리턴 int

Fetch() 공개 메소드

Runs a query against the database.
public Fetch ( DynamicCommand command ) : IList
command DynamicCommand
리턴 IList

Fetch() 공개 메소드

Runs a query against the database.
public Fetch ( string sql ) : IList
sql string
리턴 IList

GetTable() 공개 메소드

Gets a table in the database.
public GetTable ( string tableName, string primaryKeyField = "" ) : DynamicModel
tableName string
primaryKeyField string
리턴 DynamicModel

OpenConnection() 공개 메소드

Returns a database connection.
public OpenConnection ( ) : DbConnection
리턴 System.Data.Common.DbConnection

Query() 공개 메소드

Enumerates the reader yielding the results
public Query ( DynamicCommand command ) : IEnumerable
command DynamicCommand
리턴 IEnumerable

Query() 공개 메소드

Enumerates the reader yielding the result
public Query ( string sql ) : IEnumerable
sql string
리턴 IEnumerable

Scalar() 공개 메소드

Returns a single result
public Scalar ( DynamicCommand command ) : object
command DynamicCommand
리턴 object

Scalar() 공개 메소드

Returns a single result
public Scalar ( string sql ) : object
sql string
리턴 object