I have this detached criteria:
DetachedCriteria students = DetachedCriteria.For(typeof(Submission))
.SetProjection(Projections.Property("ID"))
.Add(Restrictions.In("JicsStudent.HostID", visiblestudents));
visiblestudents is a List<string>
. It works well enough until I run into the 2100 parameter restriction. visiblestudents is populated by another query that has some crazy business logic in a sproc. The return from the sproc is then linq filtered down to a list<string>
So my question is is there some way to replace the list<string>
with the sproc to prevent the SQL error? Everything I have found so far on stackoverflow suggests that I should create a temp table with the list and then use a join, but my lead would prefer that I didnt use a temp table.