# Class NpgsqlLikeTranslator

Namespace
  Npgsql.EntityFrameworkCore.PostgreSQL.Query.ExpressionTranslators.Internal

Assembly
  Npgsql.EntityFrameworkCore.PostgreSQL.dll

Translates DbFunctionsExtensions.Like methods into PostgreSQL LIKE expressions.

    public class NpgsqlLikeTranslator : IMethodCallTranslator

Inheritance
  object
  NpgsqlLikeTranslator

Implements
  IMethodCallTranslator

Inherited Members
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)
  object.ToString()

## Constructors

### NpgsqlLikeTranslator(NpgsqlSqlExpressionFactory)

Initializes a new instance of the NpgsqlMathTranslator class.

    public NpgsqlLikeTranslator(NpgsqlSqlExpressionFactory sqlExpressionFactory)

#### Parameters

`sqlExpressionFactory` NpgsqlSqlExpressionFactory

  The SQL expression factory to use when generating expressions..

## Methods

### Translate(SqlExpression?, MethodInfo, IReadOnlyList<SqlExpression>, IDiagnosticsLogger<Query>)

Translates a LINQ MethodCallExpression to a SQL equivalent.

    public virtual SqlExpression? Translate(SqlExpression? instance, MethodInfo method, IReadOnlyList<SqlExpression> arguments, IDiagnosticsLogger<DbLoggerCategory.Query> logger)

#### Parameters

`instance` SqlExpression

  A SQL representation of Object.

`method` MethodInfo

  The method info from Method.

`arguments` IReadOnlyList<SqlExpression>

  SQL representations of Arguments.

`logger` IDiagnosticsLogger<DbLoggerCategory.Query>

  The query logger to use.

#### Returns

SqlExpression

  A SQL translation of the MethodCallExpression.