Text after "div class =" itemprop = "text">
How can I declare a parameter ( id ) and add it to where NHibernate In part, select part of ICriteria API announcement @ids XML =? '& Lt; ScopeIds & gt; & Lt; ID & gt; 417444AC-6C57-4CB7-91E1-6E0B5832EDBB & lt; / Id & gt; & Lt; / ScopeIds & gt; Select * Where from MyTable P / * Other criterion list * / and @ ids.exist ('/ ScopeIds [id = SQL: column ("ScopeId")]' '= 1
There may be a way SqlProjection : // source Xml piece xml = "& lt; scopeIds> 417444AC-6C57-4CB7-91E1-6E0B5832EDBB "; // This SQL statement represents XML creation and = "Cast ('' to '.exist' var will call sql + xml + '' as XML)" + ".exist ('/ ScopeIds [id = sql: column (\ "scope id \")] '' + "AS idexists"; // Here we declare the SQL Project, NHibernate how to manage the low-level projection on SQL Projections.SqlProjection (SQL, New string [] {"idExists"}, new IType [] {NHibernateUtil.Int32}); // criteria value criteria = session. Creator Taria & lt; MyEntity & gt; (); // Here we compare the above restriction if the == 1 (true) parameter is added. (Ban. Eq (projection, 1)); // all other restrictions. ..
Comments
Post a Comment