I have a mapping in NHibernate like this:
<?xml version="1.0" encoding="utf-8"?>
<hibernate-mapping namespace="News.BusinessEntity" assembly="News.BusinessEntity" xmlns="urn:nhibernate-mapping-2.2">
<class name="News" table="News">
<property name="NewsId" type="Int64" column="NewsId" />
<property name="NewsTitle" type="String" column="NewsTitle" />
</class>
<sql-query name="Sp_News">
<return class="News" />
exec Sp_News
</sql-query>
</hibernate-mapping>
When I call session.GetNamedQuery("Sp_News")
I get the following error:
Named query not known: Sp_News.
Any help would be much appreciated.