Class ReaderStoredProcedure<TParameters, TResult1, TResult2>
Provides the means to execute data reader stored procedures returning only 2 result sets.
Inheritance
Inherited Members
Namespace: Paradigm.ORM.Data.StoredProcedures
Assembly: Paradigm.ORM.Data.dll
Syntax
public class ReaderStoredProcedure<TParameters, TResult1, TResult2> : StoredProcedureBase<TParameters>, IReaderStoredProcedure<TParameters, TResult1, TResult2>, IRoutine, IDisposable
Type Parameters
Name | Description |
---|---|
TParameters | The type of the parameters. |
TResult1 | The type of the first result. |
TResult2 | The type of the second result. |
Remarks
Instead of sending individual parameters to the procedure, the orm expects a
Constructors
| Improve this Doc View SourceReaderStoredProcedure(IServiceProvider)
Initializes a new instance of the ReaderStoredProcedure.
Declaration
public ReaderStoredProcedure(IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
IServiceProvider | serviceProvider | The service provider. |
ReaderStoredProcedure(IServiceProvider, IDatabaseConnector)
Initializes a new instance of the ReaderStoredProcedure<TParameters, TResult1, TResult2> class.
Declaration
public ReaderStoredProcedure(IServiceProvider serviceProvider, IDatabaseConnector connector)
Parameters
Type | Name | Description |
---|---|---|
IServiceProvider | serviceProvider | The service provider. |
IDatabaseConnector | connector | The database connector. |
ReaderStoredProcedure(IServiceProvider, IDatabaseConnector, IDatabaseReaderMapper<TResult1>, IDatabaseReaderMapper<TResult2>)
Initializes a new instance of the ReaderStoredProcedure.
Declaration
public ReaderStoredProcedure(IServiceProvider serviceProvider, IDatabaseConnector connector, IDatabaseReaderMapper<TResult1> mapper1, IDatabaseReaderMapper<TResult2> mapper2)
Parameters
Type | Name | Description |
---|---|---|
IServiceProvider | serviceProvider | The service provider. |
IDatabaseConnector | connector | The database connector. |
IDatabaseReaderMapper<TResult1> | mapper1 | The first result mapper. |
IDatabaseReaderMapper<TResult2> | mapper2 | The second result mapper. |
ReaderStoredProcedure(IDatabaseConnector)
Initializes a new instance of the ReaderStoredProcedure.
Declaration
public ReaderStoredProcedure(IDatabaseConnector connector)
Parameters
Type | Name | Description |
---|---|---|
IDatabaseConnector | connector | The database connector. |
ReaderStoredProcedure(IDatabaseConnector, IDatabaseReaderMapper<TResult1>, IDatabaseReaderMapper<TResult2>)
Initializes a new instance of the ReaderStoredProcedure.
Declaration
public ReaderStoredProcedure(IDatabaseConnector connector, IDatabaseReaderMapper<TResult1> mapper1, IDatabaseReaderMapper<TResult2> mapper2)
Parameters
Type | Name | Description |
---|---|---|
IDatabaseConnector | connector | The database connector. |
IDatabaseReaderMapper<TResult1> | mapper1 | The first result mapper. |
IDatabaseReaderMapper<TResult2> | mapper2 | The second result mapper. |
Methods
| Improve this Doc View SourceAfterInitialize()
Executes after the initialization.
Declaration
protected override void AfterInitialize()
Overrides
Execute(TParameters)
Executes the stored procedure and return a list of tuples.
Declaration
public Tuple<List<TResult1>, List<TResult2>> Execute(TParameters parameters)
Parameters
Type | Name | Description |
---|---|---|
TParameters | parameters | The parameters. |
Returns
Type | Description |
---|---|
Tuple<List<TResult1>, List<TResult2>> | List of tuples. |
ExecuteAsync(TParameters)
Executes the stored procedure and return a list of tuples.
Declaration
public Task<Tuple<List<TResult1>, List<TResult2>>> ExecuteAsync(TParameters parameters)
Parameters
Type | Name | Description |
---|---|---|
TParameters | parameters | The parameters. |
Returns
Type | Description |
---|---|
Task<Tuple<List<TResult1>, List<TResult2>>> | List of tuples. |