ExpressionExtensions.CreateEFPropertyExpression 方法

定义

创建一个 Expression 树,表示对给定表达式的 EF 属性访问。

此方法通常由数据库提供程序 (和其他扩展) 使用。 它通常不在应用程序代码中使用。

public static System.Linq.Expressions.Expression CreateEFPropertyExpression (this System.Linq.Expressions.Expression target, Microsoft.EntityFrameworkCore.Metadata.IPropertyBase property, bool makeNullable = true);
static member CreateEFPropertyExpression : System.Linq.Expressions.Expression * Microsoft.EntityFrameworkCore.Metadata.IPropertyBase * bool -> System.Linq.Expressions.Expression
<Extension()>
Public Function CreateEFPropertyExpression (target As Expression, property As IPropertyBase, Optional makeNullable As Boolean = true) As Expression

参数

target
Expression

将为生成的读取操作提供根的表达式。

property
IPropertyBase

要访问的属性。

makeNullable
Boolean

一个 值,该值指示该值是否可以为 null。

返回

用于访问给定表达式上的 EF 属性的表达式。

适用于