DbSet<TEntity>.GetType 方法

[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]

傳回目前 DbSet 的類型。

命名空間:  System.Data.Entity
組件:  EntityFramework (在 EntityFramework.dll 中)

語法

'宣告
<EditorBrowsableAttribute(EditorBrowsableState.Never)> _
<SuppressMessageAttribute("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")> _
Public Function GetType As Type
'用途
Dim instance As DbSet 
Dim returnValue As Type 

returnValue = instance.GetType()
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
[SuppressMessageAttribute("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
public Type GetType()
[EditorBrowsableAttribute(EditorBrowsableState::Never)]
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1024:UsePropertiesWhereAppropriate")]
public:
Type^ GetType()
[<EditorBrowsableAttribute(EditorBrowsableState.Never)>]
[<SuppressMessageAttribute("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")>]
member GetType : unit -> Type
public function GetType() : Type

傳回值

類型:System.Type
目前 DbSet 的類型。

請參閱

參考

DbSet<TEntity> 類別

System.Data.Entity 命名空間