/// <summary> /// Handles the specified message. /// </summary> /// <param name="message">The message.</param> public void Handle(UpdateEmailSentDateEvent message) { const string Cmd = @"UPDATE AssessmentModule.AssessmentInstance SET EmailSentDate = @EmailSentDate, EmailFailedDate = @EmailFailedDate where AssessmentInstanceKey = @AssessmentInstanceKey"; using (var connection = _connectionFactory.CreateConnection()) { connection.Execute( Cmd, new { AssessmentInstanceKey = message.Key, message.EmailSentDate, message.EmailFailedDate }); } }
private void Apply(UpdateEmailSentDateEvent updateEmailSentDateEvent) { EmailSentDate = updateEmailSentDateEvent.EmailSentDate; EmailFailedDate = updateEmailSentDateEvent.EmailFailedDate; }