-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
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
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]
public IEnumerable<Person> Get()
{
var client = _clientFactory.CreateClient<DefaultContainer>("TripPin"); << This doesn't exists
var people = client.People.Execute();
return people;
}Schoof-T, JerrettDavis, jaredpayne, se-andbjo and tjackadams
Metadata
Metadata
Assignees
Labels
No labels