Partilhar via


IRelationalCommand.ExecuteScalar Método

Definição

Sobrecargas

ExecuteScalar(RelationalCommandParameterObject)

Executa o comando com um único resultado escalar.

ExecuteScalar(IRelationalConnection, IReadOnlyDictionary<String,Object>)

Executa o comando com um único resultado escalar.

ExecuteScalar(IRelationalConnection, IReadOnlyDictionary<String,Object>, Boolean)
Obsoleto.

Executa o comando com um único resultado escalar.

ExecuteScalar(RelationalCommandParameterObject)

Origem:
IRelationalCommand.cs
Origem:
IRelationalCommand.cs
Origem:
IRelationalCommand.cs
Origem:
IRelationalCommand.cs

Executa o comando com um único resultado escalar.

public object ExecuteScalar (Microsoft.EntityFrameworkCore.Storage.RelationalCommandParameterObject parameterObject);
public object? ExecuteScalar (Microsoft.EntityFrameworkCore.Storage.RelationalCommandParameterObject parameterObject);
abstract member ExecuteScalar : Microsoft.EntityFrameworkCore.Storage.RelationalCommandParameterObject -> obj
Public Function ExecuteScalar (parameterObject As RelationalCommandParameterObject) As Object

Parâmetros

parameterObject
RelationalCommandParameterObject

Parâmetros para esse método.

Retornos

O resultado do comando.

Aplica-se a

ExecuteScalar(IRelationalConnection, IReadOnlyDictionary<String,Object>)

Executa o comando com um único resultado escalar.

public object ExecuteScalar (Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Collections.Generic.IReadOnlyDictionary<string,object> parameterValues);
abstract member ExecuteScalar : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Collections.Generic.IReadOnlyDictionary<string, obj> -> obj
Public Function ExecuteScalar (connection As IRelationalConnection, parameterValues As IReadOnlyDictionary(Of String, Object)) As Object

Parâmetros

connection
IRelationalConnection

A conexão com a qual executar.

parameterValues
IReadOnlyDictionary<String,Object>

Os valores dos parâmetros.

Retornos

O resultado do comando.

Aplica-se a

ExecuteScalar(IRelationalConnection, IReadOnlyDictionary<String,Object>, Boolean)

Cuidado

Use overload without 'manageConnection' parameter

Executa o comando com um único resultado escalar.

public object ExecuteScalar (Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Collections.Generic.IReadOnlyDictionary<string,object> parameterValues = default, bool manageConnection = true);
[System.Obsolete("Use overload without 'manageConnection' parameter")]
public object ExecuteScalar (Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Collections.Generic.IReadOnlyDictionary<string,object> parameterValues, bool manageConnection);
abstract member ExecuteScalar : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Collections.Generic.IReadOnlyDictionary<string, obj> * bool -> obj
[<System.Obsolete("Use overload without 'manageConnection' parameter")>]
abstract member ExecuteScalar : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Collections.Generic.IReadOnlyDictionary<string, obj> * bool -> obj
Public Function ExecuteScalar (connection As IRelationalConnection, Optional parameterValues As IReadOnlyDictionary(Of String, Object) = Nothing, Optional manageConnection As Boolean = true) As Object
Public Function ExecuteScalar (connection As IRelationalConnection, parameterValues As IReadOnlyDictionary(Of String, Object), manageConnection As Boolean) As Object

Parâmetros

connection
IRelationalConnection

A conexão com a qual executar.

parameterValues
IReadOnlyDictionary<String,Object>

Os valores dos parâmetros.

manageConnection
Boolean

Um valor que indica se a conexão deve ser aberta e fechada conforme necessário.

Retornos

O resultado do comando.

Atributos

Aplica-se a