I have a stored procedure that logs some data, how can I call this with NHibernate?
So far I have:
ISession session = ....
IQuery query = session.Cre
You can use UniqueResult to execute a stored proc that doesn't return anything. I'm using the following to call a stored proc that either inserts or updates a record to track users currently logged in to our ASP.NET MVC site.
IQuery query = session.GetNamedQuery("UserSession_Save");
query.SetInt32("UserID", userID);
query.SetString("CookieID", cookieID);
query.SetString("Controller", controller);
query.SetString("Action", action);
query.UniqueResult();