语言

DbCollectionEntry 类

定义

类的非泛型版本 DbCollectionEntry<TEntity,TElement> 。

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification="FxCop rule is wrong; Database is not two words.", MessageId="Db")]
public class DbCollectionEntry : System.Data.Entity.Infrastructure.DbMemberEntry
public class DbCollectionEntry : System.Data.Entity.Infrastructure.DbMemberEntry
type DbCollectionEntry = class
    inherit DbMemberEntry
Public Class DbCollectionEntry
Inherits DbMemberEntry
继承
DbCollectionEntry
特性

属性

名称 说明
CurrentValue

获取或设置导航属性的当前值。 当前值是导航属性引用的实体。

EntityEntry

DbEntityEntry此导航属性所属的。

IsLoaded

获取或设置一个值,该值指示是否已从数据库加载此集合的所有实体。

Name

获取属性名称。

方法

名称 说明
Cast<TEntity,TElement>()

返回等效的泛型 DbCollectionEntry<TEntity,TElement> 对象。

Equals(Object)

类的非泛型版本 DbCollectionEntry<TEntity,TElement> 。

(继承自 DbMemberEntry)
GetHashCode()

类的非泛型版本 DbCollectionEntry<TEntity,TElement> 。

(继承自 DbMemberEntry)
GetType()

获取当前实例的 Type。

(继承自 DbMemberEntry)
GetValidationErrors()

验证此属性。

(继承自 DbMemberEntry)
Load()

从数据库加载实体集合。 请注意,上下文中已存在的实体不会被数据库中的值覆盖。

LoadAsync()

从数据库异步加载实体集合。 请注意,上下文中已存在的实体不会被数据库中的值覆盖。

LoadAsync(CancellationToken)

从数据库异步加载实体集合。 请注意,上下文中已存在的实体不会被数据库中的值覆盖。

Query()

返回将用于从数据库加载此集合的查询。 可以使用 LINQ 修改返回的查询以在数据库中执行筛选或操作,例如计算数据库中集合中实体的数量,而无需实际加载它们。

ToString()

类的非泛型版本 DbCollectionEntry<TEntity,TElement> 。

(继承自 DbMemberEntry)

适用于