Summary
Refactor existing entity identifier types to use the StronglyTypedId source generator library instead of manual implementations.
Library
https://github.com/andrewlock/StronglyTypedId
Current State
Currently using manual readonly record struct implementations for IDs like CharacterId.
Proposed Changes
- Add StronglyTypedId NuGet package
- Refactor
CharacterId to use [StronglyTypedId] attribute
- Apply same pattern to any future entity IDs
- Remove manual ID boilerplate code
Benefits
- Less boilerplate code
- Consistent ID handling patterns
- Built-in JSON/EF Core converters
- Compile-time type safety
Affected Types
CharacterId - currently manual implementation in src/FantasyRpgWorld.Core/Domain/ValueObjects/CharacterId.cs
- Any future entity identifiers
Acceptance Criteria
Labels
type:refactor
Summary
Refactor existing entity identifier types to use the
StronglyTypedIdsource generator library instead of manual implementations.Library
https://github.com/andrewlock/StronglyTypedId
Current State
Currently using manual
readonly record structimplementations for IDs likeCharacterId.Proposed Changes
CharacterIdto use[StronglyTypedId]attributeBenefits
Affected Types
CharacterId- currently manual implementation insrc/FantasyRpgWorld.Core/Domain/ValueObjects/CharacterId.csAcceptance Criteria
Labels
type:refactor