On 14.03.2011 12:33, Ador wrote:
I am making a client-server application and using NHibernate 3.0. I need to provide to the end user dynamic filtering capabilities. Until now I have been using Linq to create predicates for filtering but now for this application the client (web server) is communicating with the server through services and so I need to be able to serialize the request. Thus Linq doesn't work in this senario.I have considered the Criteria and HQL methods but I don't want any NHibernate related stuff to leak to the client. I also have seen people using property names and values pairs or the Example feature of NH to pass criteria but this doesn't cover cases like : { Customer.Name = "CustomerName" OR Customer.Area = "London" } where the criteria are not AND and may have complex logic. Is there a best practice for this case?
We're serializing the complete linq tree to the server in a custom (meaning handmade) format. When we unpack the query we translate to our mapped NHibernate types. We do not have any NH bits on the client.
Best Regards, David -- dasz.at OG Tel: +43 (0)664 2602670 Web: http://dasz.at Klosterneuburg UID: ATU64260999 FB-Nr.: FN 309285 g FB-Gericht: LG Korneuburg -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
