Table of Contents

Method ExecuteReturn

Namespace
Open.Database.Extensions.Synchronous
Assembly
Open.Database.Extensions.Core.dll

ExecuteReturn(IExecuteCommand)

Executes the command with a return parameter, as ExecuteNonQuery() does, and returns the value of that parameter.

public static object? ExecuteReturn(this IExecuteCommand command)

Parameters

command IExecuteCommand

The command to execute.

Returns

object

The value from the return parameter.

ExecuteReturn<T>(IExecuteCommand)

Executes the command with a return parameter, as ExecuteNonQuery() does, and returns the value of that parameter converted to T.

public static T ExecuteReturn<T>(this IExecuteCommand command)

Parameters

command IExecuteCommand

The command to execute.

Returns

T

The value from the return parameter, converted to T as Map<T>() converts a column: a value that is already a T is returned as is, and null when it is NULL and T takes it.

Type Parameters

T

The type to convert the value to.

Exceptions

ValueMappingException

The value does not convert to T, or is out of its range, or it is NULL and T is a non-nullable value type.