DbCollectionEntry<TEntity,TElement> 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
此類別的實例會從 的 DbEntityEntry<TEntity> Collection 方法回傳,並允許對實體的集合導航屬性執行載入等操作。
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification="FxCop rule is wrong; Database is not two words.", MessageId="Db")]
public class DbCollectionEntry<TEntity,TElement> : System.Data.Entity.Infrastructure.DbMemberEntry<TEntity,System.Collections.Generic.ICollection<TElement>> where TEntity : class
public class DbCollectionEntry<TEntity,TElement> : System.Data.Entity.Infrastructure.DbMemberEntry<TEntity,System.Collections.Generic.ICollection<TElement>> where TEntity : class
type DbCollectionEntry<'Entity, 'Element (requires 'Entity : null)> = class
inherit DbMemberEntry<'Entity, ICollection<'Element> (requires 'Entity : null)>
Public Class DbCollectionEntry(Of TEntity, TElement)
Inherits DbMemberEntry(Of TEntity, ICollection(Of TElement))
類型參數
- TEntity
該財產所屬實體的類型。
- TElement
該元素在實體集合中的類型。
- 繼承
- 屬性
屬性
| 名稱 | Description |
|---|---|
| CurrentValue |
取得或設定導航屬性的當前值。 目前的值是導航屬性所參考的實體。 |
| EntityEntry |
DbEntityEntry<TEntity>該航運物業所屬。 |
| IsLoaded |
取得或設定一個值,表示該集合中的所有實體是否已從資料庫載入。 |
| Name |
取得屬性名稱。 |
方法
| 名稱 | Description |
|---|---|
| Equals(Object) |
此類別的實例會從 的 DbEntityEntry<TEntity> Collection 方法回傳,並允許對實體的集合導航屬性執行載入等操作。 (繼承來源 DbMemberEntry<TEntity,TProperty>) |
| GetHashCode() |
此類別的實例會從 的 DbEntityEntry<TEntity> Collection 方法回傳,並允許對實體的集合導航屬性執行載入等操作。 (繼承來源 DbMemberEntry<TEntity,TProperty>) |
| GetType() |
取得目前實例的 Type。 (繼承來源 DbMemberEntry<TEntity,TProperty>) |
| GetValidationErrors() |
驗證了這個屬性。 (繼承來源 DbMemberEntry<TEntity,TProperty>) |
| Load() |
載入資料庫中的實體集合。 請注意,已存在於上下文中的實體不會被資料庫的值覆蓋。 |
| LoadAsync() |
非同步載入資料庫中的實體集合。 請注意,已存在於上下文中的實體不會被資料庫的值覆蓋。 |
| LoadAsync(CancellationToken) |
非同步載入資料庫中的實體集合。 請注意,已存在於上下文中的實體不會被資料庫的值覆蓋。 |
| Query() |
回傳用於從資料庫載入此集合的查詢。 回傳的查詢可利用 LINQ 進行修改,以執行資料庫中的篩選或操作,例如在不載入集合的情況下計算集合中的實體數量。 |
| ToString() |
此類別的實例會從 的 DbEntityEntry<TEntity> Collection 方法回傳,並允許對實體的集合導航屬性執行載入等操作。 (繼承來源 DbMemberEntry<TEntity,TProperty>) |
運算子
| 名稱 | Description |
|---|---|
| Implicit(DbCollectionEntry<TEntity,TElement> to DbCollectionEntry) |
回傳一個非泛型 DbCollectionEntry 類別的新實例,該物件所代表的導航屬性。 |