RelationalCommandExtensions.ExecuteScalar 方法

定义

使用单个标量结果执行命令。

public static object ExecuteScalar (this Microsoft.EntityFrameworkCore.Storage.IRelationalCommand command, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection);
static member ExecuteScalar : Microsoft.EntityFrameworkCore.Storage.IRelationalCommand * Microsoft.EntityFrameworkCore.Storage.IRelationalConnection -> obj
<Extension()>
Public Function ExecuteScalar (command As IRelationalCommand, connection As IRelationalConnection) As Object

参数

command
IRelationalCommand

要执行的命令。

connection
IRelationalConnection

要对其执行的连接。

返回

命令的结果。

适用于