Pass XML document as parameter to Nhibernate ICriteria?

So, I have a query that I need to run in NHibernate as DetachedCriteria. The problem I am facing (very similar to this one ) is that my query can contain many thousands of input parameters, and there is a hard limit in SQL Server 2100. I believe the solution is to put my list parameters inside the XML document and pass this as the only parameter. The above page describes how it works:

session.CreateCriteria(typeof(Customer)) .Add(XmlIn.Create("id", potentiallyLargeAmount)) List(); 

That sounds EXACTLY, like what I need. However, I cannot find this XmlIn functionality anywhere in NHibernate! Where is this functionality implemented? How can I access it? Also, how does it actually parse / process the XML? Do I need to match any pattern?

+4
source share
1 answer

Looks like it's in the Rhino-Commons. I am not so familiar with this, but after some search queries I found it here: https://github.com/lorenzomelato/rhino-commons/blob/master/Rhino.Commons.NHibernate/NHibernate/XmlIn.cs

This is where I found out where to get the Rhino-Commons from:
Where to get the rhino community

Here's a link:
http://github.com/lorenzomelato/rhino-commons

+2
source

All Articles