EdmFunctions.EndsWith Method (DbExpression, DbExpression)
Creates a DbFunctionExpression that invokes the canonical 'EndsWith' function with the specified arguments, which must each have a string result type. The result type of the expression is Boolean.
Assembly: EntityFramework (in EntityFramework.dll)
public static DbFunctionExpression EndsWith( this DbExpression stringArgument, DbExpression suffix )
Parameters
- stringArgument
-
Type:
System.Data.Entity.Core.Common.CommandTrees.DbExpression
An expression that specifies the string to check for the specified suffix.
- suffix
-
Type:
System.Data.Entity.Core.Common.CommandTrees.DbExpression
An expression that specifies the suffix for which stringArgument should be checked.
Return Value
Type: System.Data.Entity.Core.Common.CommandTrees.DbFunctionExpressionA new DbFunctionExpression that indicates whether stringArgument ends with suffix.
Exception | Condition |
---|---|
ArgumentNullException | stringArgument or suffix is null. |
ArgumentException | No overload of the canonical 'EndsWith' function accepts arguments with the result types of stringArgument and suffix. |