EdmFunctions.Contains(DbExpression, DbExpression) Method

Definition

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.

C#
public static System.Data.Common.CommandTrees.DbExpression Contains(this System.Data.Common.CommandTrees.DbExpression searchedString, System.Data.Common.CommandTrees.DbExpression searchedForString);

Parameters

searchedString
DbExpression

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

searchedForString
DbExpression

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

Returns

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

Exceptions

searchedString or searchedForString is null.

searchedString or searchedForString is invalid.

Applies to

Product Versions
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1