DbReferenceEntry.Cast<TEntity, TProperty> 方法
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
傳回相等的泛型 DbReferenceEntry<TEntity, TProperty> 物件。
命名空間: System.Data.Entity.Infrastructure
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
Public Function Cast(Of TEntity As Class, TProperty) As DbReferenceEntry(Of TEntity, TProperty)
'用途
Dim instance As DbReferenceEntry
Dim returnValue As DbReferenceEntry(Of TEntity, TProperty)
returnValue = instance.Cast()
public DbReferenceEntry<TEntity, TProperty> Cast<TEntity, TProperty>()
where TEntity : class
public:
generic<typename TEntity, typename TProperty>
where TEntity : ref class
DbReferenceEntry<TEntity, TProperty>^ Cast()
member Cast : unit -> DbReferenceEntry<'TEntity, 'TProperty> when 'TEntity : not struct
JScript does not support generic types and methods.
類型參數
- TEntity
這是成員宣告所在之實體的類型。
- TProperty
此屬性的類型。
傳回值
類型:System.Data.Entity.Infrastructure.DbReferenceEntry<TEntity, TProperty>
相等的泛型物件。