DbQuery.IListSource.GetList, méthode

[Cette page concerne Entity Framework version 6. La dernière version est disponible sous le nom de package 'Entity Framework' NuGet. Pour plus d'informations sur Entity Framework, consultez msdn.com/data/ef.]

Lève une exception qui indique que la liaison directe à une requête de magasin n'est pas prise en charge. À la place, renseignez un DbSet avec les données, par exemple en utilisant la méthode d'extension Load, puis créez une liaison avec les données locales. Pour la liaison de WPF à DbSet.Local. Pour Windows Forms, créez une liaison avec DbSet.Local.ToBindingList().

Espace de noms :  System.Data.Entity.Infrastructure
Assembly :  EntityFramework (dans EntityFramework.dll)

Syntaxe

'Déclaration
<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")> _
Private Function GetList As IList 
    Implements IListSource.GetList
'Utilisation
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.

Valeur de retour

Type : System.Collections.IList
Ne retourne jamais aucune valeur ; lève toujours un exception.

Implémentations

IListSource.GetList()

Voir aussi

Référence

DbQuery Classe

Espace de noms System.Data.Entity.Infrastructure