DbCollectionEntry.Cast<TEntity, TElement> 方法

[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]

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

命名空间:  System.Data.Entity.Infrastructure
程序集:  EntityFramework(在 EntityFramework.dll 中)

语法

声明
Public Function Cast(Of TEntity As Class, TElement) As DbCollectionEntry(Of TEntity, TElement)
用法
Dim instance As DbCollectionEntry 
Dim returnValue As DbCollectionEntry(Of TEntity, TElement)

returnValue = instance.Cast()
public DbCollectionEntry<TEntity, TElement> Cast<TEntity, TElement>()
where TEntity : class
public:
generic<typename TEntity, typename TElement>
where TEntity : ref class 
DbCollectionEntry<TEntity, TElement>^ Cast()
member Cast : unit -> DbCollectionEntry<'TEntity, 'TElement>  when 'TEntity : not struct
JScript does not support generic types and methods.

类型参数

  • TEntity
    在其上声明该成员的实体的类型。
  • TElement
    集合元素的类型。

返回值

类型:System.Data.Entity.Infrastructure.DbCollectionEntry<TEntity, TElement>
等效泛型对象。

请参阅

参考

DbCollectionEntry 类

System.Data.Entity.Infrastructure 命名空间