I am finishing up a rewrite of a project management tool using ASP.NET MVC, LINQ2QL and the Repository design pattern. Pretty much following the NerdDinner example.
I have a class called Task that has a child list of TaskStages. For sake of this example the Stages are Ready, Under Development and Completed. I keep track of the current Stage on the Task, but everytime the Stage changes I want to write a historical record to the Task Stage table.
I'm struggling on where to put this functionality and maintain testability. Does it go in the Controller? Repository? or the partial class?
If this is a design issue, please let me know!