3

Coming from an NHibernate background - I have some auditing columns to reflect who last edited a record, and when that edit occurred.

I've overridden SaveChanges to look for a common base class, and update anything with EntityState.Modified/Added and set these values --

However, I want to cascade updates from child to parent in some cases, so that when I edit child, the audit tracking fields of Parent are also updated.

Does EntityFramework support this in any way?

Thanks

4

1 回答 1

0

我想我要在我想要级联的父母上添加一个自定义属性 - 然后当我检测到修改过的实体时,找到具有该属性的属性并更新它们。

于 2012-08-04T00:26:16.353 回答