Abstract base class for all EF Core entities. It contains common audit properties and the
timestamp property.
Derive from this class and add an Id property with the desired Id type.
public abstract class Entity :
Sagara.Core.Data.Models.IEntity
Inheritance System.Object 🡒 Entity
Derived
↳ GuidIdEntity
Implements IEntity
Default .ctor. Initializes the Id and sets CreateUtc and UpdateUtc
to the current UTC date/time.
public Entity();
UserId of the person who created the entity.
public System.Guid CreateUserId { get; set; }
Implements CreateUserId
UTC date/time when the entity was created.
public System.DateTime CreateUtc { get; set; }
Implements CreateUtc
SQL Server timestamp field, used for concurrency checking.
public byte[] Timestamp { get; set; }
Implements Timestamp
UserId of the person who last updated the entity.
public System.Guid UpdateUserId { get; set; }
Implements UpdateUserId
UTC date/time when the entity was last updated.
public System.DateTime UpdateUtc { get; set; }
Implements UpdateUtc