Class EntityBase
Base class for a type data entity.
Inheritance
EntityBase
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Namespace: Loehnert.TypeAndResult
Assembly: Loehnert.TypeAndResult.dll
Syntax
[MessagePackObject(false)]
public abstract class EntityBase : INotifyPropertyChanged, ITrackable
Properties
ID
Gets the primary key.
Declaration
[JsonIgnore]
[IgnoreMember]
public virtual int ID { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
TrackingState
Gets or sets the tracking state.
Declaration
[JsonIgnore]
[IgnoreMember]
[NotMapped]
[DoNotNotify]
public TrackingState TrackingState { get; set; }
Property Value
Type | Description |
---|---|
TrackingState |
Methods
ApplyID(EntityBase)
Declaration
protected void ApplyID(EntityBase source)
Parameters
Type | Name | Description |
---|---|---|
EntityBase | source | Source object. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
NotifyOfPropertyChange(String)
Notifies subscribers of the property change. If TrackingState is Unchanged it is set to Modified.
Declaration
protected void NotifyOfPropertyChange(string propertyName = "")
Parameters
Type | Name | Description |
---|---|---|
String | propertyName | Name of the property. |
Events
PropertyChanged
Occurs when a property value changes.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type | Description |
---|---|
System.ComponentModel.PropertyChangedEventHandler |
Implements
System.ComponentModel.INotifyPropertyChanged