Created
April 16, 2019 17:48
-
-
Save iqan/860ad6a9a25ba9545503ca2c563dea34 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class DummyEventHandler : IDummyEventHandler | |
| { | |
| private readonly ILogger _logger; | |
| private readonly IDatabaseService _databaseService; | |
| public DummyEventHandler(ILogger<DummyEventHandler> logger, IDatabaseService databaseService) | |
| { | |
| _logger = logger; | |
| _databaseService = databaseService; | |
| } | |
| public void Handle(DummyEvent dummyEvent) | |
| { | |
| _logger.LogInformation("Handling event"); | |
| _databaseService.InsertMessageData(new MessageDataDto | |
| { | |
| MessageText = dummyEvent.Text | |
| }); | |
| _logger.LogInformation("Event handled successfully"); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment