Skip to content

Add configurable entity set name resolution#41

Open
PavilsG wants to merge 3 commits into
panoramicdata:mainfrom
PavilsG:feature/entity-set-name-resolver
Open

Add configurable entity set name resolution#41
PavilsG wants to merge 3 commits into
panoramicdata:mainfrom
PavilsG:feature/entity-set-name-resolver

Conversation

@PavilsG

@PavilsG PavilsG commented Jul 17, 2026

Copy link
Copy Markdown

Summary

  • Add an opt-in EntitySetNameResolver for parameterless For<T>() calls.
  • Define and document the resolution order: custom resolver, [EntitySet] attribute, then built-in type-name convention.
  • Preserve existing conventions when the resolver returns null, empty, or whitespace.
  • Document a generic custom-attribute integration example.

Test coverage

  • Resolver value overrides the built-in conventions.
  • Resolver value overrides [EntitySet].
  • Whitespace falls back to [EntitySet].
  • null falls back to pluralization.
  • The explicit For<T>(entitySetName) overload does not invoke the resolver.

Validation

  • dotnet build PanoramicData.OData.Client.Test/PanoramicData.OData.Client.Test.csproj --no-restore
  • dotnet vstest PanoramicData.OData.Client.Test/bin/Debug/net10.0/PanoramicData.OData.Client.Test.dll --TestCaseFilter:"FullyQualifiedName~UnitTests" (703 passed)

@codacy-production

codacy-production Bot commented Jul 17, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 13 complexity · 0 duplication

Metric Results
Complexity 13
Duplication 0

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a configurable entity set name resolution mechanism. The implementation establishes the required resolution order: custom resolver, followed by attributes, and finally default naming conventions. Codacy analysis indicates the code is up to standards. No issues were found that should prevent merging.

Test suggestions

  • Resolver value overrides the default pluralization convention
  • Resolver value overrides the [EntitySet] attribute
  • Resolver returning whitespace falls back to the [EntitySet] attribute
  • Resolver returning null falls back to the pluralization convention
  • Explicit entity set name in For call prevents resolver invocation

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

- Add empty-string fallback, resolver-receives-type, and attribute-based resolver tests (706 pass)
- Expand EntitySetNameResolver XML docs with resolution order, per-call guidance and an example
- Clarify querying.md that a non-empty resolver short-circuits [EntitySet] and AutoPluralization
- Add CHANGELOG Unreleased entry
test/docs: strengthen EntitySetNameResolver coverage and docs
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