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

.net - C# List<T>.Find(x=>x.Rectangle.Contains(Point)) FAIL -

iphone - Smoothing a rounded stroke in Core Graphics -

c++ - QtQuick: QQmlApplicationEngine failed to load component qrc:/main.qml:23 Invalid attached object assignment -