Table of Contents

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

int

TrackingState

Gets or sets the tracking state.

[JsonIgnore]
[IgnoreMember]
[NotMapped]
[DoNotNotify]
public TrackingState TrackingState { get; set; }

Property Value

TrackingState

Methods

ApplyID(EntityBase)

Copies the ID from source to ID.

protected void ApplyID(EntityBase source)

Parameters

source EntityBase

Source 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 string

Name of the property.

Events

PropertyChanged

Occurs when a property value changes.

public event PropertyChangedEventHandler PropertyChanged

Event Type

PropertyChangedEventHandler