DbQuery.IListSource.GetList 方法

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

引发一个异常,该异常指示不支持直接绑定到存储查询。 相反,用数据填充 DbSet,例如,使用 Load 扩展方法,然后绑定到本地数据。 对于 WPF,绑定到 DbSet.Local。 对于 Windows 窗体,则绑定到 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 类

System.Data.Entity.Infrastructure 命名空间