You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
services.AddODataClient("TripPin").ConfigureODataClient(dsc =>{ dsc.BaseUri =new Uri("https://services.odata.org/v4/(S(lqbvtwide0ngdev54adgc0lu))/TripPinServiceRW/");// Github API versioning dsc.Configurations.Properties.Add("User-Agent","ODataClientFactory-Sample"));});
But there are no way to create a client with only a Name property.
Constructors available are taking as parameters : Uri serviceRoot, string name Uri serviceRoot
We are missing an empty constructor and a constructor that takes only a Name to find related configuration.
ServiceRoot should not be mandatory in this constructor.
[EnableQuery]publicIEnumerable<Person>Get(){varclient= _clientFactory.CreateClient<DefaultContainer>("TripPin");<< This doesn't exists
var people = client.People.Execute();returnpeople;}
The text was updated successfully, but these errors were encountered:
Hello,
My issue is based on this : https://docs.microsoft.com/en-us/odata/client/using-extensions#named-clients
We can create a custom client in Startup.cs
But there are no way to create a client with only a Name property.
Constructors available are taking as parameters :
Uri serviceRoot, string name
Uri serviceRoot
We are missing an empty constructor and a constructor that takes only a Name to find related configuration.
ServiceRoot should not be mandatory in this constructor.
The text was updated successfully, but these errors were encountered: