I have replaced all my NHibernate xml mapping files by loquacious mappings (mapping by code). The only thing I can't figure out is if it is possible to define this named query using loquacious mappings:
<?xml version="1.0" encoding="utf-8"?>
<hibernate-mapping namespace="Domain" assembly="Domain" xmlns="urn:nhibernate-mapping-2.2">
<sql-query name="MyFunction">
<query-param name="Inputparam1" type="Int32"/>
<query-param name="Inputparam2" type="Int32"/>
<return-scalar column="ResultParam" type="Int32"/>
<![CDATA[ select MyFunction(:Inputparam1,:Inputparam2) as ResultParam ]]>
</sql-query>
</hibernate-mapping>
Does anyone know if it's possible, and so how to do it or point me in the right direction?
Thanks in advance, Regards, Ted