Interface ISqlService
Simplic sql service
Namespace: Simplic.Sql
Assembly: Simplic.Sql.dll
Syntax
public interface ISqlService
Methods
| Improve this Doc View SourceGetIdentity<T>(String, String)
Get identity from table
Declaration
T GetIdentity<T>(string tableName, string name = "default")
Parameters
Type | Name | Description |
---|---|---|
System.String | tableName | Table name |
System.String | name | Connection name |
Returns
Type | Description |
---|---|
T | New identity value |
Type Parameters
Name | Description |
---|---|
T | Return type |
OpenConnection(Action<IDbConnection>, String)
Open new connection and dont return a value
Declaration
void OpenConnection(Action<IDbConnection> action, string name = "default")
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.Data.IDbConnection> | action | Action which will be executed after opening the connection |
System.String | name | Connection name |
OpenConnection<T>(Func<IDbConnection, T>, String)
Open new connection and return a value
Declaration
T OpenConnection<T>(Func<IDbConnection, T> action, string name = "default")
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.Data.IDbConnection, T> | action | Action which will be executed after opening the connection |
System.String | name | Connection name |
Returns
Type | Description |
---|---|
T | Func result |
Type Parameters
Name | Description |
---|---|
T | Return type |