ISqlExpressionFactory.MakeUnary Method

Definition

Overloads

MakeUnary(ExpressionType, SqlExpression, Type, RelationalTypeMapping, SqlExpression)

Source:
ISqlExpressionFactory.cs

Creates a new SqlExpression with the given arguments.

C#
public Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression? MakeUnary (System.Linq.Expressions.ExpressionType operatorType, Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression operand, Type type, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping? typeMapping = default, Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression? existingExpression = default);

Parameters

operatorType
ExpressionType

An ExpressionType representing SQL unary operator.

operand
SqlExpression

A SqlExpression to apply unary operator on.

type
Type

The type of the created expression.

typeMapping
RelationalTypeMapping

A type mapping to be assigned to the created expression.

existingExpression
SqlExpression

An optional expression that can be re-used if it matches the new expression.

Returns

A SqlExpression with the given arguments.

Applies to

Entity Framework Core 9.0
Product Versions
Entity Framework Core 9.0

MakeUnary(ExpressionType, SqlExpression, Type, RelationalTypeMapping)

Source:
ISqlExpressionFactory.cs
Source:
ISqlExpressionFactory.cs

Creates a new SqlUnaryExpression with the given arguments.

C#
public Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlUnaryExpression MakeUnary (System.Linq.Expressions.ExpressionType operatorType, Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression operand, Type type, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping = default);
C#
public Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlUnaryExpression? MakeUnary (System.Linq.Expressions.ExpressionType operatorType, Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression operand, Type type, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping? typeMapping = default);

Parameters

operatorType
ExpressionType

An ExpressionType representing SQL unary operator.

operand
SqlExpression

A SqlExpression to apply unary operator on.

type
Type

The type of the created expression.

typeMapping
RelationalTypeMapping

A type mapping to be assigned to the created expression.

Returns

A SqlUnaryExpression with the given arguments.

Applies to

Entity Framework Core 8.0 and other versions
Product Versions
Entity Framework Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0