Skip to content

fix(aspnetcore): resolve ResultEndpointFilter mapper per request#41

Open
kathelon wants to merge 2 commits into
senrecep:mainfrom
kathelon:fix/result-endpoint-filter-request-di
Open

fix(aspnetcore): resolve ResultEndpointFilter mapper per request#41
kathelon wants to merge 2 commits into
senrecep:mainfrom
kathelon:fix/result-endpoint-filter-request-di

Conversation

@kathelon
Copy link
Copy Markdown
Contributor

Summary

  • resolve IResultErrorMapper from HttpContext.RequestServices inside ResultEndpointFilter
  • keep the existing fallback behavior when no mapper is registered, including null RequestServices
  • add tests for request-scoped mapper resolution on both generic and non-generic Result failures
  • refresh the ASP.NET Core README snippet and sync the root test badge count

Validation

  • dotnet test CSharpEssentials.Tests/CSharpEssentials.Tests.csproj --filter ResultEndpointFilterTests
  • dotnet test
  • dotnet build --no-restore

Closes #6

@codecov
Copy link
Copy Markdown

codecov Bot commented May 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

feat(aspnetcore): Add ResultEndpointFilter for minimal APIs

1 participant