Skip to content

feat: add minimal api sample for primitive obsession prevention#417

Open
Mohammed-Atef2004 wants to merge 1 commit intododyg:net10.0from
Mohammed-Atef2004:feat/minimal-api-primitive-obsession
Open

feat: add minimal api sample for primitive obsession prevention#417
Mohammed-Atef2004 wants to merge 1 commit intododyg:net10.0from
Mohammed-Atef2004:feat/minimal-api-primitive-obsession

Conversation

@Mohammed-Atef2004
Copy link
Copy Markdown

Description

This PR adds a new sample under the Minimal API section demonstrating how to prevent Primitive Obsession by using Value Objects and the static TryParse pattern for automatic parameter binding in Minimal APIs.

Changes

  • Added a new project: projects/minimal-api/Primitive-Obsession
  • Integrated the sample into the main README.md and updated the Minimal API counter to (37).
  • Configured the project to target .NET 10.0.

Why this is useful?

Primitive obsession is a common anti-pattern. This sample provides a clean, practical way to handle strongly-typed parameters directly in Minimal API endpoints, improving code maintainability and domain clarity.

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.

1 participant