DbFunctionsExtensions.Like Method

Definition

Overloads

Like(DbFunctions, String, String)

An implementation of the SQL LIKE operation. On relational databases this is usually directly translated to SQL.

Note that the semantics of the comparison will depend on the database configuration. In particular, it may be either case-sensitive or case-insensitive.

Like(DbFunctions, String, String, String)

An implementation of the SQL LIKE operation. On relational databases this is usually directly translated to SQL.

Note that the semantics of the comparison will depend on the database configuration. In particular, it may be either case-sensitive or case-insensitive.

Like(DbFunctions, String, String)

An implementation of the SQL LIKE operation. On relational databases this is usually directly translated to SQL.

Note that the semantics of the comparison will depend on the database configuration. In particular, it may be either case-sensitive or case-insensitive.

public static bool Like (this Microsoft.EntityFrameworkCore.DbFunctions _, string matchExpression, string pattern);
static member Like : Microsoft.EntityFrameworkCore.DbFunctions * string * string -> bool
<Extension()>
Public Function Like (_ As DbFunctions, matchExpression As String, pattern As String) As Boolean

Parameters

_
DbFunctions

The DbFunctions instance.

matchExpression
String

The string that is to be matched.

pattern
String

The pattern which may involve wildcards %,_,[,],^.

Returns

Boolean

true if there is a match.

Remarks

This DbFunction method has no in-memory implementation and will throw if the query switches to client-evaluation. This can happen if the query contains one or more expressions that could not be translated to the store.

Applies to

Like(DbFunctions, String, String, String)

An implementation of the SQL LIKE operation. On relational databases this is usually directly translated to SQL.

Note that the semantics of the comparison will depend on the database configuration. In particular, it may be either case-sensitive or case-insensitive.

public static bool Like (this Microsoft.EntityFrameworkCore.DbFunctions _, string matchExpression, string pattern, string escapeCharacter);
static member Like : Microsoft.EntityFrameworkCore.DbFunctions * string * string * string -> bool
<Extension()>
Public Function Like (_ As DbFunctions, matchExpression As String, pattern As String, escapeCharacter As String) As Boolean

Parameters

_
DbFunctions

The DbFunctions instance.

matchExpression
String

The string that is to be matched.

pattern
String

The pattern which may involve wildcards %,_,[,],^.

escapeCharacter
String

The escape character (as a single character string) to use in front of %,_,[,],^ if they are not used as wildcards.

Returns

Boolean

true if there is a match.

Remarks

This DbFunction method has no in-memory implementation and will throw if the query switches to client-evaluation. This can happen if the query contains one or more expressions that could not be translated to the store.

Applies to