DbFunctions.Like DbFunctions.Like DbFunctions.Like Method

Definition

Overloads

Like(String, String) Like(String, String) 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) Like(String, String, String) 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) Like(String, String) 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.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId="string")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="searchString")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="likeExpression")]
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 String String

The string to search.

likeExpression
String String String

The expression to match against.

Returns

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

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.

Like(String, String, String) Like(String, String, String) 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="likeExpression")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="searchString")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId="string")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="escapeCharacter")]
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 String String

The string to search.

likeExpression
String String String

The expression to match against.

escapeCharacter
String String 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.

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