Condividi tramite


EntityObject Classe

Definizione

Questa è la classe è la base per tutte le classi EntityObject perscritte.

[System.Runtime.Serialization.DataContract(IsReference=true)]
[System.Serializable]
public abstract class EntityObject : System.Data.Entity.Core.Objects.DataClasses.StructuralObject, System.Data.Entity.Core.Objects.DataClasses.IEntityWithChangeTracker, System.Data.Entity.Core.Objects.DataClasses.IEntityWithKey, System.Data.Entity.Core.Objects.DataClasses.IEntityWithRelationships
type EntityObject = class
    inherit StructuralObject
    interface IEntityWithKey
    interface IEntityWithChangeTracker
    interface IEntityWithRelationships
Public MustInherit Class EntityObject
Inherits StructuralObject
Implements IEntityWithChangeTracker, IEntityWithKey, IEntityWithRelationships
Ereditarietà
EntityObject
Attributi
Implementazioni

Costruttori

EntityObject()

Questa è la classe è la base per tutte le classi EntityObject perscritte.

Campi

EntityKeyPropertyName

Il nome costante pubblico usato per il rilevamento delle modifiche Specificando questa definizione consente agli utenti di usare questa costante anziché la codifica dura della stringa. Ciò consente di assicurarsi che il nome della proprietà sia corretto e consenta confronti più veloci in posizioni in cui si sta cercando questa stringa specifica. Gli utenti possono comunque usare la stringa con distinzione tra maiuscole e minuscole direttamente anziché la costante, sarà leggermente più lenta sul confronto. Incluso il carattere trattino (-) intorno al nome assicura che questo non sia in conflitto con una proprietà dati reale, perché -EntityKey- non è un nome identificatore valido

(Ereditato da StructuralObject)

Proprietà

EntityKey

Ottiene o imposta la chiave per questo oggetto.

EntityState

Ottiene lo stato dell'entità dell'oggetto.

Metodi

GetValidValue<T>(T, String, Boolean, Boolean)

Restituisce un tipo complesso per la proprietà specificata.

(Ereditato da StructuralObject)
OnPropertyChanged(String)

Genera l'evento PropertyChanged.

(Ereditato da StructuralObject)
OnPropertyChanging(String)

Genera l'evento PropertyChanging.

(Ereditato da StructuralObject)
ReportPropertyChanged(String)

Notifica all'individuazione modifiche la modifica di una proprietà.

ReportPropertyChanging(String)

Notifica all'individuazione modifiche la presenza di una modifica in sospeso per una proprietà.

SetValidValue<T>(T, T, String)

Imposta un oggetto complesso per la proprietà specificata.

(Ereditato da StructuralObject)

Eventi

PropertyChanged

Notifica che è stata modificata una proprietà.

(Ereditato da StructuralObject)
PropertyChanging

Notifica che una proprietà sta per essere modificata.

(Ereditato da StructuralObject)

Implementazioni dell'interfaccia esplicita

IEntityWithChangeTracker.SetChangeTracker(IEntityChangeTracker)

Usato da ObjectStateManager per collegare o scollegare entityObject nella cache.

IEntityWithRelationships.RelationshipManager

Restituisce il contenitore per gli oggetti proprietà di spostamento delle relazioni creati in modo pigrizio, raccolte e ref.

Si applica a