共用方式為


IRelationalCommand.ExecuteScalar 方法

定義

多載

ExecuteScalar(RelationalCommandParameterObject)

使用單一純量結果執行命令。

ExecuteScalar(IRelationalConnection, IReadOnlyDictionary<String,Object>)

使用單一純量結果執行命令。

ExecuteScalar(IRelationalConnection, IReadOnlyDictionary<String,Object>, Boolean)
已淘汰.

使用單一純量結果執行命令。

ExecuteScalar(RelationalCommandParameterObject)

來源:
IRelationalCommand.cs
來源:
IRelationalCommand.cs
來源:
IRelationalCommand.cs
來源:
IRelationalCommand.cs

使用單一純量結果執行命令。

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

參數

parameterObject
RelationalCommandParameterObject

這個方法的參數。

傳回

命令的結果。

適用於

ExecuteScalar(IRelationalConnection, IReadOnlyDictionary<String,Object>)

使用單一純量結果執行命令。

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

參數

connection
IRelationalConnection

要對其執行的連線。

parameterValues
IReadOnlyDictionary<String,Object>

參數的值。

傳回

命令的結果。

適用於

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

警告

Use overload without 'manageConnection' parameter

使用單一純量結果執行命令。

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

參數

connection
IRelationalConnection

要對其執行的連線。

parameterValues
IReadOnlyDictionary<String,Object>

參數的值。

manageConnection
Boolean

值,指出是否視需要開啟和關閉連線。

傳回

命令的結果。

屬性

適用於