![]() |
Sphyrnidae Common Library
2.0.1
Shared Utilities/Library
|
A base repository instance More...
Public Member Functions | |
| virtual ApiResponseStandard | HandleException () |
| If an exception was trapped, this will provide access to the trapped exception for proper responses More... | |
Protected Member Functions | |
| virtual Task | PreCall (IDbConnection cnn, IDbTransaction trans) |
| If you need to execute something before the main call More... | |
| virtual Task | PostCall (IDbConnection cnn, IDbTransaction trans) |
| If you need to execute something after the main call More... | |
| BaseRepo (ILogger logger) | |
| Task< int > | WriteSQLAsync (string sql, object parameters, IDbTransaction trans=null) |
| Executes something against a database More... | |
| Task< int > | WriteSPAsync (string sp, object parameters, IDbTransaction trans=null) |
| Executes something against a database More... | |
| async Task< bool > | WriteSQLAsBoolAsync (string sql, object parameters, IDbTransaction trans=null) |
| Executes something against a database More... | |
| async Task< bool > | WriteSPAsBoolAsync (string sp, object parameters, IDbTransaction trans=null) |
| Executes something against a database More... | |
| Task< int?> | WriteSQLTrappingExceptionsAsync (string sql, object parameters, IDbTransaction trans=null) |
| Executes something against a database More... | |
| Task< int?> | WriteSPTrappingExceptionsAsync (string sp, object parameters, IDbTransaction trans=null) |
| Executes something against a database More... | |
| async Task< bool?> | WriteSQLAsBoolTrappingExceptionsAsync (string sql, object parameters, IDbTransaction trans=null) |
| Executes something against a database More... | |
| async Task< bool?> | WriteSPAsBoolTrappingExceptionsAsync (string sp, object parameters, IDbTransaction trans=null) |
| Executes something against a database More... | |
| Task< T > | ScalarSQLAsync< T > (string sql, object parameters, IDbTransaction trans=null) |
| Executes something against a database that returns a single result More... | |
| Task< T > | ScalarSPAsync< T > (string sp, object parameters, IDbTransaction trans=null) |
| Executes something against a database that returns a single result More... | |
| Task< T > | ScalarSQLTrappingExceptionsAsync< T > (string sql, object parameters, IDbTransaction trans=null) |
| Executes something against a database that returns a single result More... | |
| Task< T > | ScalarSPTrappingExceptionsAsync< T > (string sp, object parameters, IDbTransaction trans=null) |
| Executes something against a database that returns a single result More... | |
| Task< int?> | InsertAsync (string sql, object parameters, IDbTransaction trans=null) |
| Inserts a record into the database More... | |
| Task< int?> | InsertTrappingExceptionsAsync (string sql, object parameters, IDbTransaction trans=null) |
| Inserts a record into the database More... | |
| Task< int?> | InsertAsync (string sql, DatabaseIdentity identity, object parameters, IDbTransaction trans=null, bool trapExceptions=false) |
| Inserts a record into the database More... | |
| Task< T > | GetSQLAsync< T > (string sql, object parameters, IDbTransaction trans=null) |
| Retrieves a single record from the database More... | |
| Task< T > | GetSPAsync< T > (string sp, object parameters, IDbTransaction trans=null) |
| Retrieves a single record from the database More... | |
| Task< IEnumerable< T > > | GetListSQLAsync< T > (string sql, object parameters, IDbTransaction trans=null) |
| Retrieves multiple records (0, 1, or more) from the database More... | |
| Task< IEnumerable< T > > | GetListSPAsync< T > (string sp, object parameters, IDbTransaction trans=null) |
| Retrieves multiple records (0, 1, or more) from the database More... | |
| Task< bool > | ExistsAsync (string conditions, object parameters, IDbTransaction trans=null) |
| Does an existence check against the database More... | |
Static Protected Member Functions | |
| static string | ExistsCondition (string fromTableAndWhere) |
| Use this to add a "condition" to be used in "Exists" check More... | |
Protected Attributes | |
| Exception | Ex |
| The trapped exception More... | |
Properties | |
| abstract string | CnnStr [get] |
| The actual connection string More... | |
| abstract string | CnnName [get] |
| Nice name of the database connection (eg. web.config key) used for logging More... | |
| abstract IDbConnection | GetConnection [get] |
| The actual connection to the database More... | |
| virtual bool | DoLog [get] |
| For use with database logger: Set to false so that it won't recursively log the log call More... | |
| ILogger | Logger [get] |
| Implementation of the ILogger interface More... | |
A base repository instance
|
protected |
|
protected |
Does an existence check against the database
| conditions | The concatenated list of "ExistsCondition" method calls |
| parameters | Any parameters needed for the execution |
| trans | Optional: The transaction to be used |
|
staticprotected |
Use this to add a "condition" to be used in "Exists" check
| fromTableAndWhere | Eg. [tableName] where [something]=variable |
|
protected |
Retrieves multiple records (0, 1, or more) from the database
| sp | The Stored Procedure to execute |
| parameters | Any parameters needed for the execution |
| trans | Optional: The transaction to be used |
|
protected |
Retrieves multiple records (0, 1, or more) from the database
| sql | The SQL to execute |
| parameters | Any parameters needed for the execution |
| trans | Optional: The transaction to be used |
|
protected |
Retrieves a single record from the database
| sp | The Stored Procedure to execute |
| parameters | Any parameters needed for the execution |
| trans | Optional: The transaction to be used |
|
protected |
Retrieves a single record from the database
| sql | The SQL to execute |
| parameters | Any parameters needed for the execution |
| trans | Optional: The transaction to be used |
|
virtual |
If an exception was trapped, this will provide access to the trapped exception for proper responses
|
protected |
Inserts a record into the database
| sql | The SQL to execute |
| identity | Default = @Identity (Identity). The type of identity to retrieve |
| parameters | Any parameters needed for the execution |
| trans | Optional: The transaction to be used |
| trapExceptions | Optional: Default = false. If true, this will not throw out exceptions (will be caught in variable Ex) |
|
protected |
Inserts a record into the database
| sql | The SQL to execute |
| parameters | Any parameters needed for the execution |
| trans | Optional: The transaction to be used |
|
protected |
Inserts a record into the database
| sql | The SQL to execute |
| parameters | Any parameters needed for the execution |
| trans | Optional: The transaction to be used |
|
protectedvirtual |
If you need to execute something after the main call
|
protectedvirtual |
If you need to execute something before the main call
Reimplemented in Sphyrnidae.Common.Dal.SqlServerRepo, and Sphyrnidae.Common.Dal.MySqlRepo.
|
protected |
Executes something against a database that returns a single result
| sp | The Stored Procedure to execute |
| parameters | Any parameters needed for the execution |
| trans | Optional: The transaction to be used |
|
protected |
Executes something against a database that returns a single result
| sp | The Stored Procedure to execute |
| parameters | Any parameters needed for the execution |
| trans | Optional: The transaction to be used |
|
protected |
Executes something against a database that returns a single result
| sql | The SQL to execute |
| parameters | Any parameters needed for the execution |
| trans | Optional: The transaction to be used |
|
protected |
Executes something against a database that returns a single result
| sql | The SQL to execute |
| parameters | Any parameters needed for the execution |
| trans | Optional: The transaction to be used |
|
protected |
Executes something against a database
| sp | The Stored Procedure to execute |
| parameters | Any parameters needed for the execution |
| trans | Optional: The transaction to be used |
|
protected |
Executes something against a database
| sp | The Stored Procedure to execute |
| parameters | Any parameters needed for the execution |
| trans | Optional: The transaction to be used |
|
protected |
Executes something against a database
| sp | The Stored Procedure to execute |
| parameters | Any parameters needed for the execution |
| trans | Optional: The transaction to be used |
|
protected |
Executes something against a database
| sp | The Stored Procedure to execute |
| parameters | Any parameters needed for the execution |
| trans | Optional: The transaction to be used |
|
protected |
Executes something against a database
| sql | The SQL to execute |
| parameters | Any parameters needed for the execution |
| trans | Optional: The transaction to be used |
|
protected |
Executes something against a database
| sql | The SQL to execute |
| parameters | Any parameters needed for the execution |
| trans | Optional: The transaction to be used |
|
protected |
Executes something against a database
| sql | The SQL to execute |
| parameters | Any parameters needed for the execution |
| trans | Optional: The transaction to be used |
|
protected |
Executes something against a database
| sql | The SQL to execute |
| parameters | Any parameters needed for the execution |
| trans | Optional: The transaction to be used |
|
protected |
The trapped exception
|
getprotected |
Nice name of the database connection (eg. web.config key) used for logging
|
get |
The actual connection string
|
getprotected |
For use with database logger: Set to false so that it won't recursively log the log call
|
getprotected |
The actual connection to the database
|
getprotected |
Implementation of the ILogger interface