Show / Hide Table of Contents

Class ReaderStoredProcedure<TParameters, TResult>

Provides the means to execute data reader stored procedures returning only 1 result set.

Inheritance
System.Object
StoredProcedureBase<TParameters>
ReaderStoredProcedure<TParameters, TResult>
Implements
IReaderStoredProcedure<TParameters, TResult>
IRoutine
IDisposable
Inherited Members
StoredProcedureBase<TParameters>.ServiceProvider
StoredProcedureBase<TParameters>.Connector
StoredProcedureBase<TParameters>.Command
StoredProcedureBase<TParameters>.Dispose()
StoredProcedureBase<TParameters>.SetParametersValue(TParameters)
StoredProcedureBase<TParameters>.BeforeInitialize()
StoredProcedureBase<TParameters>.GetRoutineName()
Namespace: Paradigm.ORM.Data.StoredProcedures
Assembly: Paradigm.ORM.Data.dll
Syntax
public class ReaderStoredProcedure<TParameters, TResult> : StoredProcedureBase<TParameters>, IReaderStoredProcedure<TParameters, TResult>, IRoutine, IDisposable
Type Parameters
Name Description
TParameters

The type of the parameters.

TResult

The type of the result.

Remarks

Instead of sending individual parameters to the procedure, the orm expects a type containing or referencing the mapping information, where individual parameters will be mapped to properties.

Constructors

| Improve this Doc View Source

ReaderStoredProcedure(IServiceProvider)

Initializes a new instance of the ReaderStoredProcedure.

Declaration
public ReaderStoredProcedure(IServiceProvider serviceProvider)
Parameters
Type Name Description
IServiceProvider serviceProvider

The service provider.

| Improve this Doc View Source

ReaderStoredProcedure(IServiceProvider, IDatabaseConnector)

Initializes a new instance of the ReaderStoredProcedure<TParameters, TResult> class.

Declaration
public ReaderStoredProcedure(IServiceProvider serviceProvider, IDatabaseConnector connector)
Parameters
Type Name Description
IServiceProvider serviceProvider

The service provider.

IDatabaseConnector connector

The database connector.

| Improve this Doc View Source

ReaderStoredProcedure(IServiceProvider, IDatabaseConnector, IDatabaseReaderMapper<TResult>)

Initializes a new instance of the ReaderStoredProcedure.

Declaration
public ReaderStoredProcedure(IServiceProvider serviceProvider, IDatabaseConnector connector, IDatabaseReaderMapper<TResult> mapper)
Parameters
Type Name Description
IServiceProvider serviceProvider

The service provider.

IDatabaseConnector connector

The database connector.

IDatabaseReaderMapper<TResult> mapper

The result mapper.

| Improve this Doc View Source

ReaderStoredProcedure(IDatabaseConnector)

Initializes a new instance of the ReaderStoredProcedure.

Declaration
public ReaderStoredProcedure(IDatabaseConnector connector)
Parameters
Type Name Description
IDatabaseConnector connector

The database connector.

| Improve this Doc View Source

ReaderStoredProcedure(IDatabaseConnector, IDatabaseReaderMapper<TResult>)

Initializes a new instance of the ReaderStoredProcedure.

Declaration
public ReaderStoredProcedure(IDatabaseConnector connector, IDatabaseReaderMapper<TResult> mapper)
Parameters
Type Name Description
IDatabaseConnector connector

The database connector.

IDatabaseReaderMapper<TResult> mapper

The result mapper.

Methods

| Improve this Doc View Source

AfterInitialize()

Executes after the initialization.

Declaration
protected override void AfterInitialize()
Overrides
Paradigm.ORM.Data.StoredProcedures.StoredProcedureBase<TParameters>.AfterInitialize()
| Improve this Doc View Source

Execute(TParameters)

Executes the stored procedure and return a list of .

Declaration
public List<TResult> Execute(TParameters parameters)
Parameters
Type Name Description
TParameters parameters

The parameters.

Returns
Type Description
List<TResult>

List of

| Improve this Doc View Source

ExecuteAsync(TParameters)

Executes the stored procedure and return a list of .

Declaration
public Task<List<TResult>> ExecuteAsync(TParameters parameters)
Parameters
Type Name Description
TParameters parameters

The parameters.

Returns
Type Description
Task<List<TResult>>

List of

Implements

IReaderStoredProcedure<TParameters, TResult1>
IRoutine
IDisposable

Extension Methods

ObjectExtensions.ThrowIfFails<TException>(Object, Action, String)
ObjectExtensions.ThrowIfFails<TException, TResult>(Object, Func<TResult>, String)
ObjectExtensions.ThrowIfFailsAsync<TException>(Object, Func<Task>, String)
ObjectExtensions.ThrowIfFailsAsync<TException, TResult>(Object, Func<Task<TResult>>, String)

See Also

StoredProcedureBase<TParameters>
IReaderStoredProcedure<TParameters, TResult1>
  • Improve this Doc
  • View Source
Powered by MiracleDevs ©2017. Code licensed under the MIT License.
Documentation generated by DocFX.