开发者

where is RelatedToAttribute?

I have a tree structure and need to make a cascade delete. I've read somewhere that marking properties of my poco object with RelatedToAttribute attribute and KeyAttribute would 开发者_开发技巧do the trick. But I can't find RelatedToAttribute anywhere.

I am using mvc 3 (.net 4, VS 2010)


There is no RelatedToAttribute. It was attribute in some old CTP version of Entity Framework Feature. KeyAttribute is in System.ComponentModel.DataAnnotations assembly.

Cascade delete in Entity framework requires setting ON DELETE CASCADE in database and in entity model (or code first mapping).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜