DataSmith 0.1.2
Loading...
Searching...
No Matches
Baruah.DataSmith.Database.IDatabase Interface Reference
Inheritance diagram for Baruah.DataSmith.Database.IDatabase:
Baruah.DataSmith.Database.SqliteProviderAsset.SqliteDatabase

Public Member Functions

void Execute (string sql, object param=null)
 Executes the provided SQL statement against the database.
QuerySingle< T > (string sql, object param=null)
 Executes a SQL query expected to return a single row and maps that row to T .
IEnumerable< T > Query< T > (string sql, object param=null)
 Executes the provided SQL query and maps each result row to an instance of T .

Member Function Documentation

◆ Execute()

void Baruah.DataSmith.Database.IDatabase.Execute ( string sql,
object param = null )

Executes the provided SQL statement against the database.

Parameters
sqlThe SQL command text to execute.
paramOptional parameters for the SQL statement (e.g., anonymous object or parameter collection).

Implemented in Baruah.DataSmith.Database.SqliteProviderAsset.SqliteDatabase.

◆ Query< T >()

IEnumerable< T > Baruah.DataSmith.Database.IDatabase.Query< T > ( string sql,
object param = null )

Executes the provided SQL query and maps each result row to an instance of T .

Parameters
sqlThe SQL query to execute.
paramOptional parameters for the query (e.g., a named-parameter object); pass null if none.
Returns
An enumerable of results mapped to T .

Implemented in Baruah.DataSmith.Database.SqliteProviderAsset.SqliteDatabase.

◆ QuerySingle< T >()

T Baruah.DataSmith.Database.IDatabase.QuerySingle< T > ( string sql,
object param = null )

Executes a SQL query expected to return a single row and maps that row to T .

Parameters
sqlSQL query text to execute.
paramOptional parameters for the query; may be null.
Returns
An instance of T representing the mapped result.

Implemented in Baruah.DataSmith.Database.SqliteProviderAsset.SqliteDatabase.


The documentation for this interface was generated from the following file: