EdmFunctions.Contains Method (DbExpression, DbExpression)
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.
Assembly: EntityFramework (in EntityFramework.dll)
public static DbExpression Contains( this DbExpression searchedString, DbExpression searchedForString )
Parameters
- searchedString
-
Type:
System.Data.Entity.Core.Common.CommandTrees.DbExpression
An expression that specifies the string to search for any occurrence of searchedForString.
- searchedForString
-
Type:
System.Data.Entity.Core.Common.CommandTrees.DbExpression
An expression that specifies the string to search for in searchedString.
Return Value
Type: System.Data.Entity.Core.Common.CommandTrees.DbExpressionA new DbFunctionExpression that returns a Boolean value indicating whether or not searchedForString occurs within searchedString.
Exception | Condition |
---|---|
ArgumentNullException | searchedString or searchedForString is null. |
ArgumentException | No overload of the canonical 'Contains' function accepts arguments with the result type of searchedString and searchedForString. |