c# - Filter by unmapped parameter -


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

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -