共用方式為


ReferenceOwnershipBuilder<TEntity,TRelatedEntity>.OwnsMany 方法

定義

多載

OwnsMany<TDependentEntity>(Expression<Func<TRelatedEntity,IEnumerable<TDependentEntity>>>)

設定目標實體由 (或) 此實體的一部分所擁有的關聯性。

即使導覽的類型相同,每個擁有權關聯性的目標實體類型都會被視為不同的實體類型。 目標實體類型的設定不會套用至其他擁有權關聯性的目標實體類型。

擁有實體上的大部分作業都需要使用對應的導覽,透過擁有者實體存取它。

OwnsMany<TDependentEntity>(String)

設定目標實體由 (或) 此實體的一部分所擁有的關聯性。

即使導覽的類型相同,每個擁有權關聯性的目標實體類型都會被視為不同的實體類型。 目標實體類型的設定不會套用至其他擁有權關聯性的目標實體類型。

擁有實體上的大部分作業都需要使用對應的導覽,透過擁有者實體存取它。

OwnsMany<TDependentEntity>(Expression<Func<TRelatedEntity,IEnumerable<TDependentEntity>>>, Action<CollectionOwnershipBuilder<TRelatedEntity,TDependentEntity>>)

設定目標實體由 (或) 此實體的一部分所擁有的關聯性。

即使導覽的類型相同,每個擁有權關聯性的目標實體類型都會被視為不同的實體類型。 目標實體類型的設定不會套用至其他擁有權關聯性的目標實體類型。

擁有實體上的大部分作業都需要使用對應的導覽,透過擁有者實體存取它。

OwnsMany<TDependentEntity>(String, Action<CollectionOwnershipBuilder<TRelatedEntity,TDependentEntity>>)

設定目標實體由 (或) 此實體的一部分所擁有的關聯性。

即使導覽的類型相同,每個擁有權關聯性的目標實體類型都會被視為不同的實體類型。 目標實體類型的設定不會套用至其他擁有權關聯性的目標實體類型。

擁有實體上的大部分作業都需要使用對應的導覽,透過擁有者實體存取它。

OwnsMany<TDependentEntity>(Expression<Func<TRelatedEntity,IEnumerable<TDependentEntity>>>)

設定目標實體由 (或) 此實體的一部分所擁有的關聯性。

即使導覽的類型相同,每個擁有權關聯性的目標實體類型都會被視為不同的實體類型。 目標實體類型的設定不會套用至其他擁有權關聯性的目標實體類型。

擁有實體上的大部分作業都需要使用對應的導覽,透過擁有者實體存取它。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder<TRelatedEntity,TDependentEntity> OwnsMany<TDependentEntity> (System.Linq.Expressions.Expression<Func<TRelatedEntity,System.Collections.Generic.IEnumerable<TDependentEntity>>> navigationExpression) where TDependentEntity : class;
override this.OwnsMany : System.Linq.Expressions.Expression<Func<'RelatedEntity, seq<'DependentEntity>>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder<'RelatedEntity, 'DependentEntity (requires 'RelatedEntity : null and 'DependentEntity : null)> (requires 'DependentEntity : null)
Public Overridable Function OwnsMany(Of TDependentEntity As Class) (navigationExpression As Expression(Of Func(Of TRelatedEntity, IEnumerable(Of TDependentEntity)))) As CollectionOwnershipBuilder(Of TRelatedEntity, TDependentEntity)

類型參數

TDependentEntity

這個關聯性的目標實體類型。

參數

navigationExpression
Expression<Func<TRelatedEntity,IEnumerable<TDependentEntity>>>

Lambda 運算式,表示這個實體類型上的參考導覽屬性,表示關聯性 (customer => customer.Address) 。

傳回

CollectionOwnershipBuilder<TRelatedEntity,TDependentEntity>

物件,可用來設定擁有的類型和關聯性。

適用於

OwnsMany<TDependentEntity>(String)

設定目標實體由 (或) 此實體的一部分所擁有的關聯性。

即使導覽的類型相同,每個擁有權關聯性的目標實體類型都會被視為不同的實體類型。 目標實體類型的設定不會套用至其他擁有權關聯性的目標實體類型。

擁有實體上的大部分作業都需要使用對應的導覽,透過擁有者實體存取它。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder<TRelatedEntity,TDependentEntity> OwnsMany<TDependentEntity> (string navigationName) where TDependentEntity : class;
override this.OwnsMany : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder<'RelatedEntity, 'DependentEntity (requires 'RelatedEntity : null and 'DependentEntity : null)> (requires 'DependentEntity : null)
Public Overridable Function OwnsMany(Of TDependentEntity As Class) (navigationName As String) As CollectionOwnershipBuilder(Of TRelatedEntity, TDependentEntity)

類型參數

TDependentEntity

這個關聯性的目標實體類型。

參數

navigationName
String

此實體類型上代表關聯性的參考導覽屬性名稱。

傳回

CollectionOwnershipBuilder<TRelatedEntity,TDependentEntity>

物件,可用來設定擁有的類型和關聯性。

適用於

OwnsMany<TDependentEntity>(Expression<Func<TRelatedEntity,IEnumerable<TDependentEntity>>>, Action<CollectionOwnershipBuilder<TRelatedEntity,TDependentEntity>>)

設定目標實體由 (或) 此實體的一部分所擁有的關聯性。

即使導覽的類型相同,每個擁有權關聯性的目標實體類型都會被視為不同的實體類型。 目標實體類型的設定不會套用至其他擁有權關聯性的目標實體類型。

擁有實體上的大部分作業都需要使用對應的導覽,透過擁有者實體存取它。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder<TEntity,TRelatedEntity> OwnsMany<TDependentEntity> (System.Linq.Expressions.Expression<Func<TRelatedEntity,System.Collections.Generic.IEnumerable<TDependentEntity>>> navigationExpression, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder<TRelatedEntity,TDependentEntity>> buildAction) where TDependentEntity : class;
override this.OwnsMany : System.Linq.Expressions.Expression<Func<'RelatedEntity, seq<'DependentEntity>>> * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder<'RelatedEntity, 'DependentEntity>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder<'Entity, 'RelatedEntity (requires 'Entity : null and 'RelatedEntity : null)> (requires 'DependentEntity : null)
Public Overridable Function OwnsMany(Of TDependentEntity As Class) (navigationExpression As Expression(Of Func(Of TRelatedEntity, IEnumerable(Of TDependentEntity))), buildAction As Action(Of CollectionOwnershipBuilder(Of TRelatedEntity, TDependentEntity))) As ReferenceOwnershipBuilder(Of TEntity, TRelatedEntity)

類型參數

TDependentEntity

這個關聯性的目標實體類型。

參數

navigationExpression
Expression<Func<TRelatedEntity,IEnumerable<TDependentEntity>>>

Lambda 運算式,表示這個實體類型上的參考導覽屬性,表示關聯性 (customer => customer.Address) 。

buildAction
Action<CollectionOwnershipBuilder<TRelatedEntity,TDependentEntity>>

執行擁有類型和關聯性組態的動作。

傳回

可用來設定實體類型的 物件。

適用於

OwnsMany<TDependentEntity>(String, Action<CollectionOwnershipBuilder<TRelatedEntity,TDependentEntity>>)

設定目標實體由 (或) 此實體的一部分所擁有的關聯性。

即使導覽的類型相同,每個擁有權關聯性的目標實體類型都會被視為不同的實體類型。 目標實體類型的設定不會套用至其他擁有權關聯性的目標實體類型。

擁有實體上的大部分作業都需要使用對應的導覽,透過擁有者實體存取它。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder<TEntity,TRelatedEntity> OwnsMany<TDependentEntity> (string navigationName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder<TRelatedEntity,TDependentEntity>> buildAction) where TDependentEntity : class;
override this.OwnsMany : string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder<'RelatedEntity, 'DependentEntity>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder<'Entity, 'RelatedEntity (requires 'Entity : null and 'RelatedEntity : null)> (requires 'DependentEntity : null)
Public Overridable Function OwnsMany(Of TDependentEntity As Class) (navigationName As String, buildAction As Action(Of CollectionOwnershipBuilder(Of TRelatedEntity, TDependentEntity))) As ReferenceOwnershipBuilder(Of TEntity, TRelatedEntity)

類型參數

TDependentEntity

這個關聯性的目標實體類型。

參數

navigationName
String

此實體類型上代表關聯性的參考導覽屬性名稱。

buildAction
Action<CollectionOwnershipBuilder<TRelatedEntity,TDependentEntity>>

執行擁有類型和關聯性組態的動作。

傳回

可用來設定實體類型的 物件。

適用於