EdmFunctions.Power Method (DbExpression, DbExpression)
Creates a DbFunctionExpression that invokes the canonical 'Power' function with the specified arguments, which must have numeric result types. The result type of the expression is the same as the result type of baseArgument.
Assembly: EntityFramework (in EntityFramework.dll)
public static DbFunctionExpression Power( this DbExpression baseArgument, DbExpression exponent )
Parameters
- baseArgument
-
Type:
System.Data.Entity.Core.Common.CommandTrees.DbExpression
An expression that specifies the numeric value to raise to the given power.
- exponent
-
Type:
System.Data.Entity.Core.Common.CommandTrees.DbExpression
An expression that specifies the power to which baseArgument should be raised.
Return Value
Type: System.Data.Entity.Core.Common.CommandTrees.DbFunctionExpressionA new DbFunctionExpression that returns the value of baseArgument raised to the power specified by exponent.
Exception | Condition |
---|---|
ArgumentNullException | baseArgument or exponent is null. |
ArgumentException | No overload of the canonical 'Power' function accepts arguments with the result types of baseArgument and exponent. |