Share via


EntityFunctions.Like Method

Definition

Overloads

Like(String, String)

When used as part of a LINQ to Entities query, this method invokes the canonical Like EDM operator to match an expression.

Like(String, String, String)

When used as part of a LINQ to Entities query, this method invokes the canonical Like EDM operator to match an expression.

Like(String, String)

When used as part of a LINQ to Entities query, this method invokes the canonical Like EDM operator to match an expression.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="likeExpression")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="searchString")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId="string")]
public static bool Like (string searchString, string likeExpression);
static member Like : string * string -> bool
Public Shared Function Like (searchString As String, likeExpression As String) As Boolean

Parameters

searchString
String

The string to search.

likeExpression
String

The expression to match against.

Returns

True if the searched string matches the expression; otherwise false.

Attributes

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query. This function is translated to a corresponding function in the database.

Applies to

Like(String, String, String)

When used as part of a LINQ to Entities query, this method invokes the canonical Like EDM operator to match an expression.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="escapeCharacter")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId="string")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="likeExpression")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="searchString")]
public static bool Like (string searchString, string likeExpression, string escapeCharacter);
static member Like : string * string * string -> bool
Public Shared Function Like (searchString As String, likeExpression As String, escapeCharacter As String) As Boolean

Parameters

searchString
String

The string to search.

likeExpression
String

The expression to match against.

escapeCharacter
String

The string to escape special characters with, must only be a single character.

Returns

True if the searched string matches the expression; otherwise false.

Attributes

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query. This function is translated to a corresponding function in the database.

Applies to