Class DefaultUserEntity
The standard stored user. Declares every optional property, so directory linking, activity tracking and icons all work without further wiring.
public record DefaultUserEntity : EntityBase, ISupportInitialize, IEquatable<PersistableEntityBase>, IEntity<ObjectId>, IEquatable<EntityBase<ObjectId>>, IEquatable<EntityBase>, IUser, IEquatable<DefaultUserEntity>
- Inheritance
-
PersistableEntityBaseEntityBase<ObjectId>EntityBaseDefaultUserEntity
- Implements
-
IEquatable<PersistableEntityBase>IEntity<ObjectId>IEquatable<EntityBase>
- Inherited Members
-
EntityBase.ToString()EntityBase.GetHashCode()EntityBase.Equals(EntityBase<ObjectId>)EntityBase.Equals(EntityBase)EntityBase.<Clone>$()EntityBase.EqualityContractEntityBase<ObjectId>.Equals(PersistableEntityBase)EntityBase<ObjectId>.IdPersistableEntityBase.NeedsCleaning()PersistableEntityBase.BeginInit()PersistableEntityBase.EndInit()PersistableEntityBase.CatchAll
Remarks
The optional properties are opt-in by shape — the toolkit writes LastSeen, DirectoryId and Icon only when the entity declares somewhere to put them. A default has to choose for the host, and this one chooses all three (user, 2026-08-02).
The alternative was a smaller entity, but it fails badly and silently: Verify would find nothing, avatars would never appear, and "last seen" would read Never forever — three documented features quietly doing nothing, with no error to explain why. The cost of this choice is three nullable fields and a LastSeen write on activity.
Declare your own record implementing IUser to persist fewer, or more. There is
deliberately no UserEntityBase to derive from — IUser is the contract, and the
optional properties are exactly the ones a host should be choosing between.
Properties
DirectoryId
Enables linking to an external directory, and Verify.
public string DirectoryId { get; init; }
Property Value
public required string EMail { get; init; }
Property Value
Icon
Enables stored user icons, as opposed to Gravatar or initials alone.
public string Icon { get; init; }
Property Value
Identity
public required string Identity { get; init; }
Property Value
Key
public required string Key { get; init; }
Property Value
LastSeen
Enables activity tracking on the admin grids.
public DateTime? LastSeen { get; init; }
Property Value
Name
Display name for the user. Defaults to null. Consumers should populate this from the 'name' claim in CreateUserEntityAsync. Used for default team names and member display names.
public string Name { get; init; }