Class EntityBase
- Namespace
- Loehnert.TypeAndResult
- Assembly
- Loehnert.TypeAndResult.dll
Base class for a type data entity.
[MessagePackObject(false)]
public abstract class EntityBase : INotifyPropertyChanged, ITrackable
- Inheritance
-
EntityBase
- Implements
- Derived
- Inherited Members
- Extension Methods
Properties
ID
Gets the primary key.
[JsonIgnore]
[IgnoreMember]
public virtual int ID { get; }
Property Value
TrackingState
Gets or sets the tracking state.
[JsonIgnore]
[IgnoreMember]
[NotMapped]
[DoNotNotify]
public TrackingState TrackingState { get; set; }
Property Value
Methods
ApplyID(EntityBase)
protected void ApplyID(EntityBase source)
Parameters
source
EntityBaseSource object.
Exceptions
- ArgumentNullException
Thrown when
source
is null.
NotifyOfPropertyChange(string)
Notifies subscribers of the property change. If TrackingState is Unchanged it is set to Modified.
protected void NotifyOfPropertyChange(string propertyName = "")
Parameters
propertyName
stringName of the property.
Events
PropertyChanged
Occurs when a property value changes.
public event PropertyChangedEventHandler PropertyChanged