you should look at achieving pub/sub with events somehow. On Wed, Mar 23, 2011 at 11:15 PM, Jin <[email protected]> wrote:
> I guess can use interceptor to hook in the AddFriend method, and can > send email inside the interceptor. > > On Mar 24, 10:05 am, mynkow <[email protected]> wrote: > > Hi, > > > > We are rewriting our email notifications. Here is an example. User which > has > > Friends. When User becomes a frind _user.AddFriend(user) we should send a > > notification. The main idea is to keep the User domain and Notification > > domain unaware of each other. One way to do that is to create a service > > like: > > > > public class FollowService > > { > > public void DoFollow(User user, User followThatUser, FollowNotification > > notification) > > { > > user.AddFriend(followThatUser) > > notification.Send(user,followThatUser) > > } > > > > } > > > > What are your suggestions about this? Is there a better way? Can castle > > simplify the things for me and how? > > > > Best regards > > -- > You received this message because you are subscribed to the Google Groups > "Castle Project Users" group. > To post to this group, send email to [email protected] > . > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/castle-project-users?hl=en. > > -- Cheers, w:// -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.
