Classe ObjectResult
[Questa pagina è specifica della versione 6 di Entity Framework. La versione più recente è disponibile come pacchetto NuGet per "Entity Framework". Per ulteriori informazioni su Entity Framework, vedere la pagina msdn.com/data/ef.]
Questa classe implementa IEnumerable e IDisposable. Un'istanza di questa classe viene restituita dal metodo ObjectQuery.Execute.
Gerarchia di ereditarietà
System.Object
System.Data.Entity.Core.Objects.ObjectResult
System.Data.Entity.Core.Objects.ObjectResult<T>
Spazio dei nomi: System.Data.Entity.Core.Objects
Assembly: EntityFramework (in EntityFramework.dll)
Sintassi
'Dichiarazione
<SuppressMessageAttribute("Microsoft.Design", "CA1010:CollectionsShouldImplementGenericInterface")> _
<SuppressMessageAttribute("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")> _
Public MustInherit Class ObjectResult _
Implements IEnumerable, IDisposable, IListSource, IDbAsyncEnumerable
'Utilizzo
Dim instance As ObjectResult
[SuppressMessageAttribute("Microsoft.Design", "CA1010:CollectionsShouldImplementGenericInterface")]
[SuppressMessageAttribute("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
public abstract class ObjectResult : IEnumerable,
IDisposable, IListSource, IDbAsyncEnumerable
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1010:CollectionsShouldImplementGenericInterface")]
[SuppressMessageAttribute(L"Microsoft.Naming", L"CA1710:IdentifiersShouldHaveCorrectSuffix")]
public ref class ObjectResult abstract : IEnumerable,
IDisposable, IListSource, IDbAsyncEnumerable
[<AbstractClassAttribute>]
[<SuppressMessageAttribute("Microsoft.Design", "CA1010:CollectionsShouldImplementGenericInterface")>]
[<SuppressMessageAttribute("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")>]
type ObjectResult =
class
interface IEnumerable
interface IDisposable
interface IListSource
interface IDbAsyncEnumerable
end
public abstract class ObjectResult implements IEnumerable, IDisposable, IListSource, IDbAsyncEnumerable
Il tipo ObjectResult espone i seguenti membri.
Costruttori
rapporti | Descrizione | |
---|---|---|
ObjectResult | Questo costruttore deve essere usato solo quando si creano copie di test che sostituiranno i membri con un comportamento fittizio o falso.L'uso di questo costruttore per altri scopi può causare comportamenti imprevisti, tra cui la generazione dell'eccezione NullReferenceException. |
In alto
Proprietà
rapporti | Descrizione | |
---|---|---|
ElementType | Quando sottoposto a override in una classe derivata, ottiene il tipo dell'oggetto ObjectResult<T> generico. |
In alto
Metodi
rapporti | Descrizione | |
---|---|---|
Dispose() | Esegue attività quali liberare, rilasciare o reimpostare risorse. | |
Dispose(Boolean) | Rilascia le risorse usate dal risultato dell'oggetto. | |
Equals | (Ereditato da Object) | |
Finalize | (Ereditato da Object) | |
GetHashCode | (Ereditato da Object) | |
GetNextResult<TElement> | Ottiene il set di risultati successivo di una stored procedure. | |
GetType | (Ereditato da Object) | |
MemberwiseClone | (Ereditato da Object) | |
ToString | (Ereditato da Object) |
In alto
Implementazioni esplicite dell'interfaccia
rapporti | Descrizione | |
---|---|---|
IListSource.ContainsListCollection | Implementazione di IListSource.ContainsListCollection.Restituisce sempre false. | |
IEnumerable.GetEnumerator | Restituisce un enumeratore con cui è possibile scorrere i risultati della query. | |
IListSource.GetList | Restituisce i risultati in un formato utile per il data binding. | |
IDbAsyncEnumerable.GetAsyncEnumerator | Restituisce un enumeratore asincrono con cui è possibile scorrere i risultati della query. |
In alto
Thread safety
Qualsiasi membro static (Shared in Visual Basic) pubblico di questo tipo è thread-safe. Non è invece garantita la sicurezza dei membri dell'istanza.