EdmFunctions.Contains Method (DbExpression, DbExpression)

.NET Framework (current version)
 

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

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

public static DbExpression Contains(
	this DbExpression searchedString,
	DbExpression searchedForString
)

Parameters

searchedString
Type: System.Data.Common.CommandTrees.DbExpression

An expression that specifies the string to search for any occurence of searchedForString.

searchedForString
Type: System.Data.Common.CommandTrees.DbExpression

An expression that specifies the string to search for in searchedString.

Return Value

Type: System.Data.Common.CommandTrees.DbExpression

A new DbFunctionExpression that returns a Boolean value indicating whether or not searchedForString occurs within searchedString.

Exception Condition
ArgumentNullException

searchedStringsearchedForString

ArgumentException

searchedStringsearchedForString

.NET Framework
Available since 4.5
Return to top
Show: