nHibernate safe delete
Is there any way to check if it is safe to delete record from table ?
for example :
daoStudent.Delete(id);
doesn't throw exception if it开发者_运维知识库 has any child records , but I would like it to. I could take other actions like making student inactive.
I got it ,
SomeStudentRelation.HasItems()
to check if it has any child records.
精彩评论