EntityMappingConfiguration<TEntityType>.Properties<TObject> 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
配置将包含在此映射片段中的属性。 如果未调用此方法,则将配置尚未包含在映射片段中的所有属性。
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public void Properties<TObject> (System.Linq.Expressions.Expression<Func<TEntityType,TObject>> propertiesExpression);
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public void Properties<TObject> (System.Linq.Expressions.Expression<Func<TEntityType,TObject>> propertiesExpression);
member this.Properties : System.Linq.Expressions.Expression<Func<'EntityType, 'Object>> -> unit
Public Sub Properties(Of TObject) (propertiesExpression As Expression(Of Func(Of TEntityType, TObject)))
类型参数
- TObject
包含要映射的属性的匿名类型。
参数
- propertiesExpression
- Expression<Func<TEntityType,TObject>>
包含要映射的属性的匿名类型的 lambda 表达式。 C#: t => new { t.Id, t.Property1, t.Property2 } VB.Net: Function (t) New with { p.Id, t.Property1, t.Property2 }
- 属性