OT: Nhibernate delete

OT: Nhibernate delete

Old forum URL: forums.lhotka.net/forums/t/9084.aspx

ajj3085 posted on Monday, June 14, 2010


Using Nhibernate as an ORM, and haven't had much luck.  Basically I'm trying to do the equivolent of a disconnected delete with Linq to Sql.  Basically the NHibernate version of this:

using( ctx = new MyDataContext()) {

    var myTableObj = new MyTableObj();

    myTableObj.Id = 5;

     ctx.Attach( myTableObj );

     ctx.DeleteOnSubmit( myTableObj );



Any ideas?

ajj3085 replied on Tuesday, June 15, 2010

Doing this is pretty much what you'd expect; I had another problem in my own code which was tripping things up.

Copyright (c) Marimer LLC