/// <summary> /// Performs the Notification /// </summary> public void Notify(object data) { var recipeComment = data as RecipeComment; var recipeSummary = this.RecipeService.GetRecipeSummaryById(recipeComment.RecipeId); var commenterUsername = this.UserService.GetUserSummaryById(recipeComment.UserId).Username; // Get users to notify var usersToNotify = this.NotificationService.GetUsersForRecipeCommentNotification(recipeComment.RecipeId, recipeComment.UserId); // Notify the Lot usersToNotify.ForEach(x => { var emailMessage = new RecipeCommentEmailMessage(this.WebSettings, recipeSummary, commenterUsername, x, recipeComment, this.RecipeUrlBuilder); this.EmailSender.Send(emailMessage); }); }