Check how it's done in NHibernate tests: nhibernate-core/ODataTests.cs at master ยท nhibernate/nhibernate-core (github.com) <https://github.com/nhibernate/nhibernate-core/blob/master/src/NHibernate.Test/Linq/ODataTests.cs>
On Thursday, December 2, 2021 at 12:23:33 PM UTC+2 [email protected] wrote: > Hi, > > We have a ASP.Net Core Web Api and we use NHibernate. We would like to > have OData filtering applied at query level. > > I try to explain better: if we add the [EnableQuery] attribute to our > endpoints, OData filtering works but it is applied after *all* records > have been fetched from db, while we would like to have the NHibernate query > modified to apply filtering at db level. > > So basically the question is: if I have a ODataQueryOptions input > parameter, how can I use it Filter property to modify the NHibernate query > to get data from db? > > I found a package named "NHibernate.OData" but it is quite old (2015) and > it is not working with version 5 of NHibernate. > > Any help is appreciated! > > Thank you, > Cristiano Muzi > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nhusers/e0cf5327-d75b-4503-9bee-437369464bdan%40googlegroups.com.
