ZEXSM / OData.QueryBuilder

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

Use guids as keys in ByKey Method #55

Closed christophanneken closed 3 years ago

christophanneken commented 3 years ago

In our project we use Guids as keys

var uri = new ODataQueryBuilder<ODataInfoContainer>("http://mock/odata")
    .For<ODataTypeEntity>(s => s.ODataType)
    .ByKey(295b2f1d-a17e-4d26-bcfb-c8f79d023763)
    .ToUri()

Inserting the guid as string results in wrong urls. It would be great if the ByKey method could be extended to use guids.

ZEXSM commented 3 years ago

Hey! I have made a change, could you please watch this https://github.com/ZEXSM/OData.QueryBuilder/tree/bugfix/use-guid-bykey#-bykey

is that what you need?

christophanneken commented 3 years ago

Hi, exactly what I needed! Thanks a lot