How to instantiate Mediatr as part of a Unit Test?

You’re on the right lines with or a mockup – you need to mock the IMediator There’s a few mocking libraries out there: Moq FakeItEasy NSubstitute Moq is one of the most popular, so, using your test as an example: [Fact] public async void UpdateCustomerCommand_CustomerDataUpdatedOnDatabase() { //Arrange var mediator = new Mock<IMediator>(); UpdateCustomerCommand command = … Read more

What difference between NEventStore and EventStoreDB

NEventStore is a persistence agnostic event sourcing library for .NET with multiple storage options such as relational and document databases. EventStoreDB is a newer and high performing event sourcing solution with its own persistence engine and API’s for multiple protocols and languages. It has open source and commercial options. As far as I know you … Read more

Using an RDBMS as event sourcing storage

The event store should not need to know about the specific fields or properties of events. Otherwise every modification of your model would result in having to migrate your database (just as in good old-fashioned state-based persistence). Therefore I wouldn’t recommend option 1 and 2 at all. Below is the schema as used in Ncqrs. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)