simple-odata-client / Simple.OData.Client

MIT License
331 stars 197 forks source link

how we can detect function in url? #569

Open nighotatul opened 5 years ago

nighotatul commented 5 years ago

example: https://services.odata.org/v4/(S(34wtn2c0hkuk5ekg0pjr513b))/TripPinServiceRW/People('russellwhyte')/Trips(0)/Microsoft.OData.SampleService.Models.TripPin.GetInvolvedPeople() how we can excute above url ? we have calling findentryasync().if their is another function call from from your library then how to detect function or string from url so we can called perticuler method from your library.

object commented 5 years ago

It's all in the service metadocument. All entity sets, actions and functions are described in the service metadata.

nighotatul commented 5 years ago

is their method or class which can parse metadatdocument to get all function name,entity set,action and if parameter exits.so our task it should be easy for us to list out function name,entity set to end user.

object commented 5 years ago

This is provided by Microsoft.OData.Edm for OData V4 and Microsoft.Data.Edm for OData V1-3. They offer different versions of IEdmModel interface that can be used to navigate and query the model. You can obtain this interface via IODataClient by using GetModayAsync which returns the underlying model.