DbQuery<TResult>.IListSource.GetList 方法

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

擲回例外狀況,表示不支援直接繫結至存放區查詢。 改為以資料填入 DbSet,例如,藉由使用 Load 擴充方法,然後繫結至本機資料。 如果是 WPF,則繫結至 DbSet.Local。 如果是 Windows Form,則繫結至 DbSet.Local.ToBindingList()。

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

語法

'宣告
<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")> _
Private Function GetList As IList 
    Implements IListSource.GetList
'用途
Dim instance As DbQuery 
Dim returnValue As IList 

returnValue = CType(instance, IListSource).GetList()
[SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
IList IListSource.GetList()
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
private:
virtual IList^ GetList() sealed = IListSource::GetList
[<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")>]
private abstract GetList : unit -> IList 
[<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")>]
private override GetList : unit -> IList
JScript supports the use of explicit interface implementations, but not the declarations of new ones.

傳回值

類型:System.Collections.IList
絕對不會傳回,一定會擲回。

Implements

IListSource.GetList()

請參閱

參考

DbQuery<TResult> 類別

System.Data.Entity.Infrastructure 命名空間