{"id":3762,"date":"2014-03-30T05:22:11","date_gmt":"2014-03-30T05:22:11","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/problem-about-icriteria-collection-of-common-programming-errors\/"},"modified":"2014-03-30T05:22:11","modified_gmt":"2014-03-30T05:22:11","slug":"problem-about-icriteria-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/problem-about-icriteria-collection-of-common-programming-errors\/","title":{"rendered":"problem about icriteria-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/3849ae04cc1d65c892fcc6adc0f6b2fe?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nreach4thelasers<br \/>\ncriteria icriteria nhlambdaextensions<br \/>\nMy application creates a dynamically generated query at runtime based on user input by creating Criterion objects e.g:ICriterion criterion = Restrictions.Eq(&#8220;Name&#8221;, &#8220;John&#8221;); &#8230;&#8230; detachedCriteriaSomewhereElse.Add(criterion);How do I do this in NHLambdaExtensions?what I really need to do isICriterion criterion = Restrictions.Eq&lt;Person&gt;(p=&gt; p.Name == &#8220;John&#8221;);but this isn&#8217;t valid. Is there any way to do this?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/428344688dc21d72a3723d94bed66680?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nStu Thompson<br \/>\nc# nhibernate icriteria<br \/>\nI need to recreate a query using nHibernate Criteria. This query had a where clause that was pretty ugly.((t.Disposition_CD)=&#8217;ac&#8217; Or (t.Disposition_CD)=&#8217;cc&#8217; Or (t.Disposition_CD)=&#8217;Co&#8217; Or (t.Disposition_CD)=&#8217;SF&#8217; Or (t.Disposition_CD)=&#8217;SC&#8217; Or (t.Disposition_CD)=&#8217;OR&#8217; Or (t.Disposition_CD)=&#8217;SV&#8217; Or (t.Disposition_CD)=&#8217;RI&#8217; Or (t.Disposition_CD)=&#8217;WN&#8217; Or (t.Disposition_CD)=&#8217;NC&#8217; Or (t.Disposition_CD)=&#8217;DN&#8217; Or (t.Disposition_CD)=&#8217;WT&#8217; Or (t.Disposition_CD)=&#8217;MA&#8217; Or (t.Disposition_CD)=&#8217;TO&#8217; Or<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>reach4thelasers criteria icriteria nhlambdaextensions My application creates a dynamically generated query at runtime based on user input by creating Criterion objects e.g:ICriterion criterion = Restrictions.Eq(&#8220;Name&#8221;, &#8220;John&#8221;); &#8230;&#8230; detachedCriteriaSomewhereElse.Add(criterion);How do I do this in NHLambdaExtensions?what I really need to do isICriterion criterion = Restrictions.Eq&lt;Person&gt;(p=&gt; p.Name == &#8220;John&#8221;);but this isn&#8217;t valid. Is there any way to do [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3762","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3762","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3762"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3762\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3762"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3762"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}