开发者

nHibernate safe delete

开发者 https://www.devze.com 2022-12-19 15:03 出处:网络
Is there any way to check if it is safe to delete record from table ? for example : daoStudent.Delete(id);

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消