EdmFunctions.Right Method (DbExpression, DbExpression)

 

Creates a DbFunctionExpression that invokes the canonical 'Right' function with the specified arguments, which must have a string and integer numeric result type. The result type of the expression is string.

Namespace:   System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder
Assembly:  EntityFramework (in EntityFramework.dll)

public static DbFunctionExpression Right(
	this DbExpression stringArgument,
	DbExpression length
)

Parameters

stringArgument
Type: System.Data.Entity.Core.Common.CommandTrees.DbExpression

An expression that specifies the string from which to extract the rightmost substring.

length
Type: System.Data.Entity.Core.Common.CommandTrees.DbExpression

An expression that specifies the length of the rightmost substring to extract from stringArgument.

Return Value

Type: System.Data.Entity.Core.Common.CommandTrees.DbFunctionExpression

A new DbFunctionExpression that returns the the rightmost substring of length length from stringArgument.

Exception Condition
ArgumentNullException

stringArgument or length is null.

ArgumentException

No overload of the canonical 'Right' function accepts an argument with the result type of stringArgument.