Method connection not implemented

I am using Fluent NHibernate,

I wrote the following code to select the client name and CustProdId.

when i execute the code i got error,

"Join method not implemented."

How do I write an inner join for this request?

var data = (from cp in session.Linq<CustomerProduct>()                        
                     join cu in session.Linq<Customer>()
                         on cp.customerId equals cu.customerID                        
                     select new
                     {
                         cp.CUSTPRODID,
                        cu.CUSTOMERNAME
                     }).Distinct();

      

0


source to share


1 answer


This is a limitation of the Linq to NHibernate implementation that comes with Fluent NHibernate and not directly FNH.



Basically you are out of luck using linq for complex queries until the rewrite is complete in the NHibernate backbone. You should go back to the criteria API or HQL.

+1


source







All Articles