Show / Hide Table of Contents

Class ScalarStoredProcedure<TParameters, TResult>

Provides the means to execute scalar stored procedures.

Inheritance
System.Object
StoredProcedureBase<TParameters>
ScalarStoredProcedure<TParameters, TResult>
Implements
IScalarStoredProcedure<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>.AfterInitialize()
StoredProcedureBase<TParameters>.GetRoutineName()
Namespace: Paradigm.ORM.Data.StoredProcedures
Assembly: Paradigm.ORM.Data.dll
Syntax
public class ScalarStoredProcedure<TParameters, TResult> : StoredProcedureBase<TParameters>, IScalarStoredProcedure<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

ScalarStoredProcedure(IServiceProvider)

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

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

The service provider.

| Improve this Doc View Source

ScalarStoredProcedure(IServiceProvider, IDatabaseConnector)

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

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

The service provider.

IDatabaseConnector connector

The database connector.

| Improve this Doc View Source

ScalarStoredProcedure(IDatabaseConnector)

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

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

The database connector.

Methods

| Improve this Doc View Source

ExecuteScalar(TParameters)

Executes the stored procedure and returns a scalar value.

Declaration
public TResult ExecuteScalar(TParameters parameters)
Parameters
Type Name Description
TParameters parameters

The parameters.

Returns
Type Description
TResult

The scalar value.

| Improve this Doc View Source

ExecuteScalarAsync(TParameters)

Executes the stored procedure and returns a scalar value.

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

The parameters.

Returns
Type Description
Task<TResult>

The scalar value.

Implements

IScalarStoredProcedure<TParameters, TResult>
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>
IScalarStoredProcedure<TParameters, TResult>
  • Improve this Doc
  • View Source
Powered by MiracleDevs ©2017. Code licensed under the MIT License.
Documentation generated by DocFX.