EntityCollection<TEntity> 构造函数

定义

初始化 EntityCollection<TEntity> 类的新实例。Initializes a new instance of the EntityCollection<TEntity> class.

public:
 EntityCollection();
public EntityCollection ();
Public Sub New ()

注解

EntityCollection<TEntity> 的此公开构造函数旨在供对象服务在反序列化对象图时使用。This public constructor for EntityCollection<TEntity> is intended to be used by Object Services when deserializing object graphs. 应从导航属性而不是使用此构造函数访问 EntityCollection<TEntity> 的实例。You should access an instance of EntityCollection<TEntity> from a navigation property instead of using this constructor.

要存储特定实体类型的对象的非相关集合,例如 ObjectQuery<T> 的结果,请使用 List<T> 的实例。To store an unrelated collection of objects of a specific entity type, such as the result of an ObjectQuery<T>, use an instance of List<T>.

适用于