The tutorial has been great up to this point. However, I think I have an NHibernate problem that I can't figure out...
I have a
connectionstring of
<connectionStrings>
<add name="ApplicationServices"
connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=ToBeSeenDB;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
I know the connection string is OK, because I can connect to the ToBeSeenDB database via the Database Explorer.
However, inside the
HomeController.cs, the following line always returns zero (0), when I know there is one row in the Event table:
ViewBag.EventCount = session.QueryOver<Event>().RowCount();
I can't seem to diagnose why I am getting nothing back. I'm not sure this is a Windsor problem or an NHibernate problem. I should reiterate, that I have been following this tutorial one step at a time, so I haven't just downloaded all the code from github. However, All the essential parts are there and the MVC app works and generates a response for the browser; I simply get a rowcount of zero!
I would really appreciate any help and I have been trying to diagnose this problem!