So, let me get this straight.

You cannot delete this object because you will go and recreate it because of its associations?

Have you thought that maybe…

.. And I know this is a VERY crazy thought…

That I want to GET RID OF THIS RECORD and its Associations?

nHibernate sucks. It sucked 4 years ago when I used it, and it sucks bigtime now too.


public void ActuallyDeleteEmail(int emailId)
 {
 ISQLQuery sqlQuery = Session.CreateSQLQuery(string.Format('DELETE FROM [TABLE] WHERE ID={0}', emailId.ToString()));
 sqlQuery.ExecuteUpdate();
 }

OH! MY! GOD!

YOU CAN ACTUALLY DELETE THE RECORD? WHO KNEW?

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DotNetKicks
  • DZone