Skip to content

Commit 8d46796

Browse files
committed
Made Entity.Id private init.
1 parent 064610d commit 8d46796

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

DomainModeling/DomainModeling.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ Misc:
7171
- Fix: Fixed bug where DummyBuilder generator struggled with nested types.
7272
- Fix: Fixed bug where "no source generation on nested type" warning would not show.
7373
- Enhancement: Generated types now have the CompilerGeneratedAttribute.
74+
- Enhancement: Entity.Id has private init.
7475
- Enhancement: Nicer DebuggerDisplay of Wrappers/Identities.
7576
- Enhancement: Generated struct Wrappers/Identities now generate NULLABLE comparison operators, to circumvent counterintuitive lifting behavior.
7677
- Enhancement: Improved clarity of analyzer warnings, by stopping before subsequent problems occur.

DomainModeling/Entity.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public abstract class Entity<
8181
/// <summary>
8282
/// The entity's unique identity.
8383
/// </summary>
84-
public TId Id { get; }
84+
public TId Id { get; private init; }
8585

8686
/// <param name="id">The unique identity for the entity.</param>
8787
protected Entity(TId id)

0 commit comments

Comments
 (0)