/// <summary> /// Handles the specified message. /// </summary> /// <param name="message">The message.</param> public void Handle(PatientRemovedFromTeamEvent message) { using (var connection = _connectionFactory.CreateConnection()) { connection.Execute( "DELETE FROM OrganizationModule.TeamPatient WHERE PatientKey = @PatientKey", new { message.PatientKey }); } }
private void Apply(PatientRemovedFromTeamEvent patientRemovedFromTeamEvent) { _patientKeys.Remove(patientRemovedFromTeamEvent.PatientKey); }