C# Class Db, code

Datei anzeigen Open project: shendongnian/code Class Usage Examples

Public Methods

Method Description
CommandAsync ( Func, command ) : Task
CreateConnection ( ) : bool
Db ( )
Db ( Func, dbConnectionFactory )
Db ( bool disableBatching )
Db ( string connectionString )
ExecuteAsync ( string sql, object parameters ) : Task
GetAsync ( Func command ) : Task
GetAsync ( string sql, object parameters ) : Task
GetData ( ) : DbDataReader
SelectAsync ( Func command ) : Task>
SelectAsync ( string sql, object parameters ) : Task>

Protected Methods

Method Description
OnConfiguring ( DbContextOptionsBuilder optionsBuilder ) : void

Method Details

CommandAsync() public method

public CommandAsync ( Func, command ) : Task
command Func,
return Task

CreateConnection() public method

public CreateConnection ( ) : bool
return bool

Db() public method

public Db ( )

Db() public method

public Db ( Func, dbConnectionFactory )
dbConnectionFactory Func,

Db() public method

public Db ( bool disableBatching )
disableBatching bool

Db() public method

public Db ( string connectionString )
connectionString string

ExecuteAsync() public method

public ExecuteAsync ( string sql, object parameters ) : Task
sql string
parameters object
return Task

GetAsync() public method

public GetAsync ( Func command ) : Task
command Func
return Task

GetAsync() public method

public GetAsync ( string sql, object parameters ) : Task
sql string
parameters object
return Task

GetData() public method

public GetData ( ) : DbDataReader
return DbDataReader

OnConfiguring() protected method

protected OnConfiguring ( DbContextOptionsBuilder optionsBuilder ) : void
optionsBuilder DbContextOptionsBuilder
return void

SelectAsync() public method

public SelectAsync ( Func command ) : Task>
command Func
return Task>

SelectAsync() public method

public SelectAsync ( string sql, object parameters ) : Task>
sql string
parameters object
return Task>