/// <summary> /// Email the total movie reviews to the noted address. /// </summary> /// <param name="movieTitleAndReleaseYear">Movie title and release year.</param> /// <param name="emailAddress">The email address to send the results to.</param> public void EmailTotalReviews( string movieTitleAndReleaseYear, string emailAddress) { var movieEntity = new MovieEntity { MovieTitleAndReleaseYear = movieTitleAndReleaseYear, EmailAddress = emailAddress }; var movieLookupCommand = new MovieLookupCommand { MovieEntity = movieEntity }; var queue = new Queue(); queue.AddMessage(movieLookupCommand); }
/// <summary> /// Save the complaint, for later processing. /// </summary> /// <param name="fullName">Complaint person's full name.</param> /// <param name="complaint">The complaint.</param> /// <param name="level">Level of complaint.</param> public void ProcessComplaint( string fullName, string complaint, string level) { var complaintEntity = new ComplaintEntity { FullName = fullName, Complaint = complaint, Level = level }; var processComplaintCommand = new ProcessComplaintCommand { ComplaintEntity = complaintEntity }; var queue = new Queue(); queue.AddMessage(processComplaintCommand); }
/// <summary> /// Leave a reply for the designated recipients. /// </summary> /// <param name="reply">Reply to be left.</param> /// <param name="emailAddress">User's email address.</param> public void LeaveReply( string reply, string emailAddress) { // Persist the data to table storage. var blogPostReplyEntity = new BlogPostReplyEntity { Reply = reply, EmailAddress = emailAddress }; var table = new Table(); table.AddEntity(blogPostReplyEntity); // Create the command object. var dispatchMessageCommand = new NewBlogPostReplyCommand { BlogPostReplyEntity = blogPostReplyEntity }; // Add the command into queue storage, for later processing. var queue = new Queue(); queue.AddMessage(dispatchMessageCommand); }