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
This discussion is made based on this issue.
I'm trying to change LINQ Expression generated by OData lib (mainly Select and Expand) from original strcuture based on ISelectAndExpandWrapper to something more handable. I've created a Console App and used code below to do this (as i was suggested) but it seems ISelectExpandBinder is not instantiated here. What am I doing wrong?
IServiceCollection services = new ServiceCollection();
services.AddSingleton<ISelectExpandBinder, MySelectExpandBinder>();
services.AddSingleton<IFilterBinder, FilterBinder>();
services.AddSingleton<IOrderByBinder, OrderByBinder>();
var serviceProvider = services.BuildServiceProvider();
ODataQueryOptions<Model2> opts = new ODataQueryOptions<Model2>
(
context,
BuildRequest
(
new DefaultHttpContext()
{
RequestServices = serviceProvider
}.Request,
new Uri(BASEADDRESS + queryString)
)
);
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This discussion is made based on this issue.
I'm trying to change LINQ Expression generated by OData lib (mainly Select and Expand) from original strcuture based on ISelectAndExpandWrapper to something more handable. I've created a Console App and used code below to do this (as i was suggested) but it seems ISelectExpandBinder is not instantiated here. What am I doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions