EdmFunctions.Power(DbExpression, DbExpression) 方法

定义

创建一个 DbFunctionExpression,它使用指定的参数(每个参数都必须具有数值结果类型)调用规范“Power”函数。Creates a DbFunctionExpression that invokes the canonical 'Power' function with the specified arguments, which must have numeric result types. 表达式的结果类型与 baseArgument 的结果类型相同。The result type of the expression is the same as the result type of baseArgument.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Data::Common::CommandTrees::DbFunctionExpression ^ Power(System::Data::Common::CommandTrees::DbExpression ^ baseArgument, System::Data::Common::CommandTrees::DbExpression ^ exponent);
public static System.Data.Common.CommandTrees.DbFunctionExpression Power (this System.Data.Common.CommandTrees.DbExpression baseArgument, System.Data.Common.CommandTrees.DbExpression exponent);
static member Power : System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression -> System.Data.Common.CommandTrees.DbFunctionExpression
<Extension()>
Public Function Power (baseArgument As DbExpression, exponent As DbExpression) As DbFunctionExpression

参数

baseArgument
DbExpression

一个表达式,指定要计算其指定次幂的数值。An expression that specifies the numeric value to raise to the given power.

exponent
DbExpression

一个表达式,指定应为其引发 baseArgument 的幂。An expression that specifies the power to which baseArgument should be raised.

返回

DbFunctionExpression

新的 DbFunctionExpression,返回 exponent 指定的指数的幂执行的“baseArgument”值。A new DbFunctionExpression that returns the value of baseArgument raised to the power specified by exponent.

例外

baseArgument exponent baseArgument exponent

baseArgument exponent baseArgument exponent

适用于