語言

DbEntityEntry<TEntity>.Collection 方法

定義

多載

名稱 Description
Collection(String)

取得一個物件,代表集合的導覽屬性,從此實體到一組相關實體。

Collection<TElement>(Expression<Func<TEntity,ICollection<TElement>>>)

取得一個物件,代表集合的導覽屬性,從此實體到一組相關實體。

Collection<TElement>(String)

取得一個物件,代表集合的導覽屬性,從此實體到一組相關實體。

Collection(String)

取得一個物件,代表集合的導覽屬性,從此實體到一組相關實體。

public System.Data.Entity.Infrastructure.DbCollectionEntry Collection(string navigationProperty);
member this.Collection : string -> System.Data.Entity.Infrastructure.DbCollectionEntry
Public Function Collection (navigationProperty As String) As DbCollectionEntry

參數

navigationProperty
String

導覽屬性的名稱。

傳回

一個代表導航性質的物件。

適用於

Collection<TElement>(Expression<Func<TEntity,ICollection<TElement>>>)

取得一個物件,代表集合的導覽屬性,從此實體到一組相關實體。

public System.Data.Entity.Infrastructure.DbCollectionEntry<TEntity,TElement> Collection<TElement>(System.Linq.Expressions.Expression<Func<TEntity,System.Collections.Generic.ICollection<TElement>>> navigationProperty) where TElement : class;
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public System.Data.Entity.Infrastructure.DbCollectionEntry<TEntity,TElement> Collection<TElement>(System.Linq.Expressions.Expression<Func<TEntity,System.Collections.Generic.ICollection<TElement>>> navigationProperty) where TElement : class;
member this.Collection : System.Linq.Expressions.Expression<Func<'Entity, System.Collections.Generic.ICollection<'Element>>> -> System.Data.Entity.Infrastructure.DbCollectionEntry<'Entity, 'Element (requires 'Entity : null and 'Element : null)> (requires 'Element : null)
Public Function Collection(Of TElement As Class) (navigationProperty As Expression(Of Func(Of TEntity, ICollection(Of TElement)))) As DbCollectionEntry(Of TEntity, TElement)

類型參數

TElement

集合中的項目類型。

參數

navigationProperty
Expression<Func<TEntity,ICollection<TElement>>>

一個表示導航性質的表達式。

傳回

一個代表導航性質的物件。

屬性

適用於

Collection<TElement>(String)

取得一個物件,代表集合的導覽屬性,從此實體到一組相關實體。

public System.Data.Entity.Infrastructure.DbCollectionEntry<TEntity,TElement> Collection<TElement>(string navigationProperty) where TElement : class;
member this.Collection : string -> System.Data.Entity.Infrastructure.DbCollectionEntry<'Entity, 'Element (requires 'Entity : null and 'Element : null)> (requires 'Element : null)
Public Function Collection(Of TElement As Class) (navigationProperty As String) As DbCollectionEntry(Of TEntity, TElement)

類型參數

TElement

集合中的項目類型。

參數

navigationProperty
String

導覽屬性的名稱。

傳回

一個代表導航性質的物件。

適用於