Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ 364 Add Vogen for Strongly Typed IDs #441

Merged
merged 5 commits into from
Nov 18, 2024

Conversation

danielmackay
Copy link
Member

  1. What triggered this change? (PBI link, Email Subject, conversation + reason, etc)

#364

  1. What was changed?

This pull request includes several changes aimed at refactoring the codebase to use strongly typed IDs and improving the configuration of the Entity Framework Core (EF Core) models. The most important changes include the introduction of the Vogen library for value objects, updates to the HeroId, TeamId, and MissionId types, and adjustments to the entity configurations.

Refactoring to use strongly typed IDs:

Entity Framework Core configuration updates:

  • src/Infrastructure/Persistence/ApplicationDbContext.cs: Added the RegisterAllInVogenEfCoreConverters method call in ConfigureConventions to register the Vogen converters.
  • src/Infrastructure/Persistence/Configuration/HeroConfiguration.cs, MissionConfiguration.cs, TeamConfiguration.cs: Commented out the manual conversions for HeroId, MissionId, and TeamId as they are now handled by Vogen's EF Core converters. [1] [2] [3]

Additional changes:

  • src/Domain/Domain.csproj: Added the Vogen package reference.
  • tests/Domain.UnitTests/Heroes/HeroTests.cs, MissionTests.cs, TeamTests.cs: Updated tests to use the HeroId.From, MissionId.From, and TeamId.From methods. [1] [2] [3] [4]
  1. Did you do pair or mob programming?

No

@danielmackay danielmackay linked an issue Nov 18, 2024 that may be closed by this pull request
@danielmackay danielmackay marked this pull request as ready for review November 18, 2024 22:44
@danielmackay danielmackay changed the title Fixed architecture tests ✨ 364 Add Vogen for Strongly Typed IDs Nov 18, 2024
@danielmackay danielmackay requested a review from a team November 18, 2024 22:45
Copy link
Member

@AntPolkanov AntPolkanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@AntPolkanov AntPolkanov merged commit 996dad5 into main Nov 18, 2024
2 checks passed
@AntPolkanov AntPolkanov deleted the 364--consider-using-vogen-for-strongly-typed-ids branch November 18, 2024 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨ Consider using Vogen for Strongly Typed IDs
2 participants