ZEXSM / OData.QueryBuilder

OData.QueryBuilder - library for creating complex OData queries (OData version 4.01) based on data models with linq syntax.
MIT License
77 stars 31 forks source link

Implemented 'ODataPropertyName' attribute #117

Closed pikami closed 4 months ago

pikami commented 1 year ago

There may be cases when the model in the OData service is different from the model in the application. In those cases we need a way to override the property names of our model to match those in the OData service. This PR adds support for custom property names during query building by using a new 'ODataPropertyName' attribute.

This fixes and or provides workarounds the following issues:

While I believe this feature can be beneficial in certain scenarios, I do acknowledge that it may not be the most elegant or intuitive solution. I'm more than open to discussing alternative approaches that might better align with this library's design philosophy.

BarberMSFT commented 4 months ago

will this get approved?

pikami commented 4 months ago

will this get approved?

@BarberMSFT I've published my patched version to nuget, you can use it while this PR is not merged. https://www.nuget.org/packages/OData.BigQueryBuilder

ZEXSM commented 4 months ago

will this get approved?

@BarberMSFT I've published my patched version to nuget, you can use it while this PR is not merged. https://www.nuget.org/packages/OData.BigQueryBuilder

pikami commented 4 months ago

@ZEXSM Looks like your ci pipeline doesn't have the "CONFIGURATION" variable set.

ZEXSM commented 4 months ago

@pikami, checked, she is there, I'm still figuring out what the problem is

ZEXSM commented 4 months ago

@pikami try

pikami commented 4 months ago

@ZEXSM Just checked, it works as expected.

ZEXSM commented 4 months ago

@pikami, try merge PR

pikami commented 4 months ago

Only those with write access can merge pull requests.

BarberMSFT commented 4 months ago

was out last week but awesome work, thank you!