When changes occur on some reservation I want everyone involved getting a mail about the changes.
Actually I am not sure how to get this done. But I geuss my first question should be.
How should I check if changes have accord and how am I suppose to know which person people are involved in the changes?
I am using Entity Framework ( Lazy Loading ) in MVC 3.
deltu,
this can be resolved in a number of ways. the one that I use today is based on raising an event when the repository is saving changes. not sure what your configuration looks like, but here’s a snippet of what I do:
then simple make sure that your client code subscribes to the SavingChanges EventHandler. Job done. You literally only subscribe within the context of where you know the crucial changes are and then fire off an email service call inseide that event handler.
hope this helps.
[edit] in response to comment below, you would raise either of these events in either the service class, the base abstract class, or more simply, in your controller. here’s an example of the controller raising the event:
hope this points you in a more ‘pointed’ direction 🙂