c# - nHibernate safe delete -


Is there a way to check that it is safe to delete the record from the table?

For example:

  Daostudent. Delete (id);  

Exceptions do not thrown if it has any hair record, but I like it. I can also do other actions like deactivating a student.

I got it,

  SomeStudentRelation.HasItems ()  

to check that it has a child record.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -