2022-09-23

Correct way to Trigger Parent Entity UpdatedAt Refresh when Child Entity is Updated

In this scenario using EF I have an Author who has a 1 to N relationship with Articles. The requirement is that when an Article is updated the Author's UpdatedAt timestamp should reflect the change. Now the brute force way would be to load the Author and do a dummy Save when I'm updating an Article. That seems very inefficient. Is there a best practice approach?



No comments:

Post a Comment