ComplexPropertyBuilder<TComplex>.ComplexProperty 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
ComplexProperty(String, Action<ComplexPropertyBuilder>)
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
配置复杂类型的复杂属性。 如果不存在具有给定名称的属性,则将添加新属性。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TComplex> ComplexProperty(string propertyName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder> buildAction);
override this.ComplexProperty : string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Complex>
Public Overridable Function ComplexProperty (propertyName As String, buildAction As Action(Of ComplexPropertyBuilder)) As ComplexPropertyBuilder(Of TComplex)
参数
- propertyName
- String
要配置的属性的名称。
- buildAction
- Action<ComplexPropertyBuilder>
执行属性配置的操作。
返回
同一个生成器实例,以便可以链接多个配置调用。
注解
使用此重载添加新属性时,属性名称必须与复杂类型上的 CLR 属性或字段的名称匹配。 此重载不能用于添加新的阴影状态复杂属性。
适用于
ComplexProperty(Type, String, Action<ComplexPropertyBuilder>)
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
配置复杂类型的复杂属性。 如果不存在具有给定名称的属性,则将添加新属性。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TComplex> ComplexProperty(Type propertyType, string propertyName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder> buildAction);
override this.ComplexProperty : Type * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Complex>
Public Overridable Function ComplexProperty (propertyType As Type, propertyName As String, buildAction As Action(Of ComplexPropertyBuilder)) As ComplexPropertyBuilder(Of TComplex)
参数
- propertyType
- Type
要配置的属性的类型。
- propertyName
- String
要配置的属性的名称。
- buildAction
- Action<ComplexPropertyBuilder>
执行属性配置的操作。
返回
同一个生成器实例,以便可以链接多个配置调用。
注解
添加新的复杂属性时,如果复杂类中存在同名的属性,则会将其添加到模型中。 如果复杂类中不存在任何属性,则将添加新的阴影状态复杂属性。 阴影状态属性是复杂类中没有相应属性的属性。 该属性的当前值存储在复杂类的实例中 ChangeTracker ,而不是存储在实例中。
适用于
ComplexProperty(Type, String, String, Action<ComplexPropertyBuilder>)
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
配置复杂类型的复杂属性。 如果不存在具有给定名称的属性,则将添加新属性。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TComplex> ComplexProperty(Type propertyType, string propertyName, string complexTypeName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder> buildAction);
override this.ComplexProperty : Type * string * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Complex>
Public Overridable Function ComplexProperty (propertyType As Type, propertyName As String, complexTypeName As String, buildAction As Action(Of ComplexPropertyBuilder)) As ComplexPropertyBuilder(Of TComplex)
参数
- propertyType
- Type
要配置的属性的类型。
- propertyName
- String
要配置的属性的名称。
- complexTypeName
- String
复杂类型的名称。
- buildAction
- Action<ComplexPropertyBuilder>
执行属性配置的操作。
返回
同一个生成器实例,以便可以链接多个配置调用。
注解
添加新的复杂属性时,如果复杂类中存在同名的属性,则会将其添加到模型中。 如果复杂类中不存在任何属性,则将添加新的阴影状态复杂属性。 阴影状态属性是复杂类中没有相应属性的属性。 该属性的当前值存储在复杂类的实例中 ChangeTracker ,而不是存储在实例中。
适用于
ComplexProperty<TProperty>(String, Action<ComplexPropertyBuilder<TProperty>>)
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
配置复杂类型的复杂属性。 如果不存在具有给定名称的属性,则将添加新属性。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TComplex> ComplexProperty<TProperty>(string propertyName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TProperty>> buildAction);
override this.ComplexProperty : string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Complex>
Public Overridable Function ComplexProperty(Of TProperty) (propertyName As String, buildAction As Action(Of ComplexPropertyBuilder(Of TProperty))) As ComplexPropertyBuilder(Of TComplex)
类型参数
- TProperty
要配置的属性的类型。
参数
- propertyName
- String
要配置的属性的名称。
- buildAction
- Action<ComplexPropertyBuilder<TProperty>>
执行属性配置的操作。
返回
同一个生成器实例,以便可以链接多个配置调用。
注解
添加新属性时,如果复杂类中存在同名的属性,则会将其添加到模型中。 如果复杂类中不存在任何属性,则将添加新的阴影状态复杂属性。 阴影状态属性是复杂类中没有相应属性的属性。 该属性的当前值存储在复杂类的实例中 ChangeTracker ,而不是存储在实例中。
适用于
ComplexProperty<TProperty>(String, String, Action<ComplexPropertyBuilder<TProperty>>)
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
配置复杂类型的复杂属性。 如果不存在具有给定名称的属性,则将添加新属性。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TComplex> ComplexProperty<TProperty>(string propertyName, string complexTypeName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TProperty>> buildAction);
override this.ComplexProperty : string * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Complex>
Public Overridable Function ComplexProperty(Of TProperty) (propertyName As String, complexTypeName As String, buildAction As Action(Of ComplexPropertyBuilder(Of TProperty))) As ComplexPropertyBuilder(Of TComplex)
类型参数
- TProperty
要配置的属性的类型。
参数
- propertyName
- String
要配置的属性的名称。
- complexTypeName
- String
复杂类型的名称。
- buildAction
- Action<ComplexPropertyBuilder<TProperty>>
执行属性配置的操作。
返回
同一个生成器实例,以便可以链接多个配置调用。
注解
添加新属性时,如果复杂类中存在同名的属性,则会将其添加到模型中。 如果复杂类中不存在任何属性,则将添加新的阴影状态复杂属性。 阴影状态属性是复杂类中没有相应属性的属性。 该属性的当前值存储在复杂类的实例中 ChangeTracker ,而不是存储在实例中。
适用于
ComplexProperty<TProperty>(Expression<Func<TComplex,TProperty>>, String, Action<ComplexPropertyBuilder<TProperty>>)
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
配置复杂类型的复杂属性。 如果不存在具有给定名称的属性,则将添加新属性。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TComplex> ComplexProperty<TProperty>(System.Linq.Expressions.Expression<Func<TComplex,TProperty?>> propertyExpression, string complexTypeName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TProperty>> buildAction);
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TComplex> ComplexProperty<TProperty>(System.Linq.Expressions.Expression<Func<TComplex,TProperty>> propertyExpression, string complexTypeName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TProperty>> buildAction);
override this.ComplexProperty : System.Linq.Expressions.Expression<Func<'Complex, 'Property>> * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Complex>
Public Overridable Function ComplexProperty(Of TProperty) (propertyExpression As Expression(Of Func(Of TComplex, TProperty)), complexTypeName As String, buildAction As Action(Of ComplexPropertyBuilder(Of TProperty))) As ComplexPropertyBuilder(Of TComplex)
类型参数
- TProperty
要配置的属性的类型。
参数
- propertyExpression
- Expression<Func<TComplex,TProperty>>
一个 lambda 表达式,表示要配置的属性( blog => blog.Url)。
- complexTypeName
- String
复杂类型的名称。
- buildAction
- Action<ComplexPropertyBuilder<TProperty>>
执行属性配置的操作。
返回
同一个生成器实例,以便可以链接多个配置调用。
注解
添加新属性时,如果复杂类中存在同名的属性,则会将其添加到模型中。 如果复杂类中不存在任何属性,则将添加新的阴影状态复杂属性。 阴影状态属性是复杂类中没有相应属性的属性。 该属性的当前值存储在复杂类的实例中 ChangeTracker ,而不是存储在实例中。
适用于
ComplexProperty<TProperty>(Expression<Func<TComplex,Nullable<TProperty>>>, String, Action<ComplexPropertyBuilder<TProperty>>)
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
配置复杂类型的复杂属性。 如果不存在具有给定名称的属性,则将添加新属性。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TComplex> ComplexProperty<TProperty>(System.Linq.Expressions.Expression<Func<TComplex,TProperty?>> propertyExpression, string complexTypeName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TProperty>> buildAction) where TProperty : struct;
override this.ComplexProperty : System.Linq.Expressions.Expression<Func<'Complex, Nullable<'Property>>> * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Complex> (requires 'Property : struct)
Public Overridable Function ComplexProperty(Of TProperty As Structure) (propertyExpression As Expression(Of Func(Of TComplex, Nullable(Of TProperty))), complexTypeName As String, buildAction As Action(Of ComplexPropertyBuilder(Of TProperty))) As ComplexPropertyBuilder(Of TComplex)
类型参数
- TProperty
要配置的属性的类型。
参数
- propertyExpression
- Expression<Func<TComplex,Nullable<TProperty>>>
一个 lambda 表达式,表示要配置的属性( blog => blog.Url)。
- complexTypeName
- String
复杂类型的名称。
- buildAction
- Action<ComplexPropertyBuilder<TProperty>>
执行属性配置的操作。
返回
同一个生成器实例,以便可以链接多个配置调用。
注解
添加新属性时,如果复杂类中存在同名的属性,则会将其添加到模型中。 如果复杂类中不存在任何属性,则将添加新的阴影状态复杂属性。 阴影状态属性是复杂类中没有相应属性的属性。 该属性的当前值存储在复杂类的实例中 ChangeTracker ,而不是存储在实例中。
适用于
ComplexProperty<TProperty>(Expression<Func<TComplex,TProperty>>, String)
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
返回一个对象,该对象可用于配置复杂类型的复杂属性。 如果不存在具有给定名称的属性,则将添加新属性。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TProperty> ComplexProperty<TProperty>(System.Linq.Expressions.Expression<Func<TComplex,TProperty?>> propertyExpression, string complexTypeName);
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TProperty> ComplexProperty<TProperty>(System.Linq.Expressions.Expression<Func<TComplex,TProperty>> propertyExpression, string complexTypeName);
override this.ComplexProperty : System.Linq.Expressions.Expression<Func<'Complex, 'Property>> * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property>
Public Overridable Function ComplexProperty(Of TProperty) (propertyExpression As Expression(Of Func(Of TComplex, TProperty)), complexTypeName As String) As ComplexPropertyBuilder(Of TProperty)
类型参数
- TProperty
要配置的属性的类型。
参数
- propertyExpression
- Expression<Func<TComplex,TProperty>>
一个 lambda 表达式,表示要配置的属性( blog => blog.Url)。
- complexTypeName
- String
复杂类型的名称。
返回
可用于配置属性的对象。
注解
添加新属性时,如果复杂类中存在同名的属性,则会将其添加到模型中。 如果复杂类中不存在任何属性,则将添加新的阴影状态复杂属性。 阴影状态属性是复杂类中没有相应属性的属性。 该属性的当前值存储在复杂类的实例中 ChangeTracker ,而不是存储在实例中。
适用于
ComplexProperty<TProperty>(Expression<Func<TComplex,Nullable<TProperty>>>, Action<ComplexPropertyBuilder<TProperty>>)
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
配置复杂类型的复杂属性。 如果不存在具有给定名称的属性,则将添加新属性。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TComplex> ComplexProperty<TProperty>(System.Linq.Expressions.Expression<Func<TComplex,TProperty?>> propertyExpression, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TProperty>> buildAction) where TProperty : struct;
override this.ComplexProperty : System.Linq.Expressions.Expression<Func<'Complex, Nullable<'Property>>> * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Complex> (requires 'Property : struct)
Public Overridable Function ComplexProperty(Of TProperty As Structure) (propertyExpression As Expression(Of Func(Of TComplex, Nullable(Of TProperty))), buildAction As Action(Of ComplexPropertyBuilder(Of TProperty))) As ComplexPropertyBuilder(Of TComplex)
类型参数
- TProperty
要配置的属性的类型。
参数
- propertyExpression
- Expression<Func<TComplex,Nullable<TProperty>>>
一个 lambda 表达式,表示要配置的属性( blog => blog.Url)。
- buildAction
- Action<ComplexPropertyBuilder<TProperty>>
执行属性配置的操作。
返回
同一个生成器实例,以便可以链接多个配置调用。
注解
添加新属性时,如果复杂类中存在同名的属性,则会将其添加到模型中。 如果复杂类中不存在任何属性,则将添加新的阴影状态复杂属性。 阴影状态属性是复杂类中没有相应属性的属性。 该属性的当前值存储在复杂类的实例中 ChangeTracker ,而不是存储在实例中。
适用于
ComplexProperty<TProperty>(Expression<Func<TComplex,Nullable<TProperty>>>, String)
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
返回一个对象,该对象可用于配置复杂类型的复杂属性。 如果不存在具有给定名称的属性,则将添加新属性。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TProperty> ComplexProperty<TProperty>(System.Linq.Expressions.Expression<Func<TComplex,TProperty?>> propertyExpression, string complexTypeName) where TProperty : struct;
override this.ComplexProperty : System.Linq.Expressions.Expression<Func<'Complex, Nullable<'Property>>> * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property (requires 'Property : struct)> (requires 'Property : struct)
Public Overridable Function ComplexProperty(Of TProperty As Structure) (propertyExpression As Expression(Of Func(Of TComplex, Nullable(Of TProperty))), complexTypeName As String) As ComplexPropertyBuilder(Of TProperty)
类型参数
- TProperty
要配置的属性的类型。
参数
- propertyExpression
- Expression<Func<TComplex,Nullable<TProperty>>>
一个 lambda 表达式,表示要配置的属性( blog => blog.Url)。
- complexTypeName
- String
复杂类型的名称。
返回
可用于配置属性的对象。
注解
添加新属性时,如果复杂类中存在同名的属性,则会将其添加到模型中。 如果复杂类中不存在任何属性,则将添加新的阴影状态复杂属性。 阴影状态属性是复杂类中没有相应属性的属性。 该属性的当前值存储在复杂类的实例中 ChangeTracker ,而不是存储在实例中。
适用于
ComplexProperty<TProperty>(Expression<Func<TComplex,TProperty>>, Action<ComplexPropertyBuilder<TProperty>>)
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
返回一个对象,该对象可用于配置复杂类型的复杂属性。 如果不存在具有给定名称的属性,则将添加新属性。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TComplex> ComplexProperty<TProperty>(System.Linq.Expressions.Expression<Func<TComplex,TProperty?>> propertyExpression, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TProperty>> buildAction);
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TComplex> ComplexProperty<TProperty>(System.Linq.Expressions.Expression<Func<TComplex,TProperty>> propertyExpression, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TProperty>> buildAction);
override this.ComplexProperty : System.Linq.Expressions.Expression<Func<'Complex, 'Property>> * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Complex>
Public Overridable Function ComplexProperty(Of TProperty) (propertyExpression As Expression(Of Func(Of TComplex, TProperty)), buildAction As Action(Of ComplexPropertyBuilder(Of TProperty))) As ComplexPropertyBuilder(Of TComplex)
类型参数
- TProperty
要配置的属性的类型。
参数
- propertyExpression
- Expression<Func<TComplex,TProperty>>
一个 lambda 表达式,表示要配置的属性( blog => blog.Url)。
- buildAction
- Action<ComplexPropertyBuilder<TProperty>>
执行属性配置的操作。
返回
同一个生成器实例,以便可以链接多个配置调用。
注解
添加新属性时,如果复杂类中存在同名的属性,则会将其添加到模型中。 如果复杂类中不存在任何属性,则将添加新的阴影状态复杂属性。 阴影状态属性是复杂类中没有相应属性的属性。 该属性的当前值存储在复杂类的实例中 ChangeTracker ,而不是存储在实例中。
适用于
ComplexProperty<TProperty>(Expression<Func<TComplex,TProperty>>)
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
返回一个对象,该对象可用于配置复杂类型的复杂属性。 如果不存在具有给定名称的属性,则将添加新属性。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TProperty> ComplexProperty<TProperty>(System.Linq.Expressions.Expression<Func<TComplex,TProperty?>> propertyExpression);
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TProperty> ComplexProperty<TProperty>(System.Linq.Expressions.Expression<Func<TComplex,TProperty>> propertyExpression);
override this.ComplexProperty : System.Linq.Expressions.Expression<Func<'Complex, 'Property>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property>
Public Overridable Function ComplexProperty(Of TProperty) (propertyExpression As Expression(Of Func(Of TComplex, TProperty))) As ComplexPropertyBuilder(Of TProperty)
类型参数
- TProperty
要配置的属性的类型。
参数
- propertyExpression
- Expression<Func<TComplex,TProperty>>
一个 lambda 表达式,表示要配置的属性( blog => blog.Url)。
返回
可用于配置属性的对象。
注解
添加新属性时,如果复杂类中存在同名的属性,则会将其添加到模型中。 如果复杂类中不存在任何属性,则将添加新的阴影状态复杂属性。 阴影状态属性是复杂类中没有相应属性的属性。 该属性的当前值存储在复杂类的实例中 ChangeTracker ,而不是存储在实例中。
适用于
ComplexProperty<TProperty>(Expression<Func<TComplex,Nullable<TProperty>>>)
- Source:
- ComplexPropertyBuilder`.cs
- Source:
- ComplexPropertyBuilder`.cs
返回一个对象,该对象可用于配置复杂类型的复杂属性。 如果不存在具有给定名称的属性,则将添加新属性。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TProperty> ComplexProperty<TProperty>(System.Linq.Expressions.Expression<Func<TComplex,TProperty?>> propertyExpression) where TProperty : struct;
override this.ComplexProperty : System.Linq.Expressions.Expression<Func<'Complex, Nullable<'Property>>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property (requires 'Property : struct)> (requires 'Property : struct)
Public Overridable Function ComplexProperty(Of TProperty As Structure) (propertyExpression As Expression(Of Func(Of TComplex, Nullable(Of TProperty)))) As ComplexPropertyBuilder(Of TProperty)
类型参数
- TProperty
要配置的属性的类型。
参数
- propertyExpression
- Expression<Func<TComplex,Nullable<TProperty>>>
一个 lambda 表达式,表示要配置的属性( blog => blog.Url)。
返回
可用于配置属性的对象。
注解
添加新属性时,如果复杂类中存在同名的属性,则会将其添加到模型中。 如果复杂类中不存在任何属性,则将添加新的阴影状态复杂属性。 阴影状态属性是复杂类中没有相应属性的属性。 该属性的当前值存储在复杂类的实例中 ChangeTracker ,而不是存储在实例中。