I am using nHibernate in my project but I have a stored procedure which just returns a boolen of success or now.
How do I code this in c#?
I have tried the following but it doesnt like cause I dont have a mapping for bool!!!
{"No persister for: System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"}
IQuery query = NHibernateSession.CreateSQLQuery("EXEC MyDatabase.dbo.[ContentProvider_Import] :ContentProviderImportLogId", "success", typeof(bool))
.SetInt32("ContentProviderImportLogId", log.Id);
var test = query.UniqueResult<bool>();
and the same result from
IQuery query = NHibernateSession.CreateSQLQuery("EXEC MyDatabase.dbo.[ContentProvider_Import] :ContentProviderImportLogId")
.AddEntity(typeof(bool))
.SetInt32("ContentProviderImportLogId", log.Id);
var test = query.UniqueResult<bool>();