Make even the other question you send me in private and you will see that somebody will help...
On Wed, Oct 13, 2010 at 1:07 PM, Tola Chhoeun <[email protected]> wrote: > Hi All, > > I am trying to call stor-proc using NHibernate, but I alway got exception > "Named query not known: spGetItemDetail"; type NHibernate.MappingException > > Here are what I got: > ItemDetail.hbn.xml > > <?xml version="1.0" encoding="utf-8" ?> > <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" > assembly="MyApplication.Common" > namespace="MyApplication.Common.Domain"> > > <sql-query name="spGetItemDetail"> > <return class="ItemDetail"> > <return-property column="ItemID" name="ItemID"/> > <return-property column="Number" name="Number"> > </return> > exec dbo.spGetItemDetail :ItemId > </sql-query> > > </hibernate-mapping> > > > Class ItemDetail.cs > > namespace MyApplication.Common.Domain > { > public class ItemDetail > { > public int ItemID {get; set;} > public int Number {get; set;} > } > } > > > Calling Stor-Proc > > IQuery query = _session.GetNamedQuery("spGetItemDetail"); //Here is > where I got the exception > query.SetInt32("ItemId", 13); > return query.List<ItemDetail>(); > > > > I am so frustrated to get it working, please help. > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > -- Fabio Maulo -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
