EdmFunctions.StartsWith Method (DbExpression, DbExpression)

 

Creates a DbFunctionExpression that invokes the canonical 'StartsWith' function with the specified arguments, which must each have a string result type. The result type of the expression is Boolean.

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

public static DbFunctionExpression StartsWith(
	this DbExpression stringArgument,
	DbExpression prefix
)

Parameters

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

An expression that specifies the string to check for the specified prefix.

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

An expression that specifies the prefix for which stringArgument should be checked.

Return Value

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

A new DbFunctionExpression that indicates whether stringArgument starts with prefix.

Exception Condition
ArgumentNullException

stringArgument or prefix is null.

ArgumentException

No overload of the canonical 'StartsWith' function accepts arguments with the result types of stringArgument and prefix.