共用方式為


EntityMappingConfiguration<TEntityType>.Properties<TObject> 方法

定義

設定將會包含在這個對應片段中的屬性。 如果未呼叫這個方法,則會設定尚未包含在對應片段中的所有屬性。

[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 }

屬性

適用於