tags:

views:

43

answers:

1

Hi Guys,

I am in trouble right now. I am new in Nhibernate 2.0.1

Please see my code below.

string strquery = "from MAgency ma where ma.statusflag= :statusflag"; IList magencylist = session.CreateQuery(strquery).SetString("statusflag", "1"). List();

No error found but there is no result entity count? What is the problem in my code? since I want to use parameter in my query.

Thanks

A: 

Grab a demo of NHibernate Profiler and see what kind of query is being generated. You might be able to just fire up sql profiler and see what sql is being sent to the server.

Beyond that you haven't really provided enough information to diagnose the issue.

joshperry