AspNetCoreOData
AspNetCoreOData copied to clipboard
LINQ2DB support
Hi, Would it be possible to improve LINQ2DB support? I've noticed that most of my problems came from null propagation handling. The HandleNullPropagationOptionHelper has some hardcoded namespaces for Microsoft DB libraries, are there some special conditions that need to be met to "certify" LINQ2DB to add it there? I feel that a lot of people that have tried LINQ2DB were unable to get to the bottom of why they received errors. I know that the workaround is to set [EnableQuery(HandleNullPropagation = HandleNullPropagationOption.False)], but it's not easy to find.
Asking for support for "library X" seems like the wrong way to go about this. Wouldn't it be best to "make it provider-agnostic" instead, working only with the IQueryable
interface?
It would be nice, but I imagine that would take a lot of effort. I'd be OK with something as simple as adding an option in Startup that makes provider X handle null propagation as I see fit.
@aboryczko We can look at improving the error message if we're able to identify this error case. We can also see about making it possible to configure the HandleNullPropagation
setting from Startup. We welcome pull request contribution if you're in a position to contribute
@gathogojr as far as I understand the idea is that the in-memory provider needs to have null handling done by the library, but the database ones usually do it on their own and setting this globaly might break it if someone exposes an in-memory IQueryable. Doing a hard default during startup would break this, right? If this is not the case I could do something simple within DefaultQuerySettings to set this.