├── .gitignore ├── CQRSExample.sln ├── Core ├── Core.csproj └── Person │ ├── Address.cs │ ├── DomainEvents │ ├── AddressChanged.cs │ ├── DomainEvent.cs │ └── PersonCreated.cs │ ├── Person.cs │ ├── PersonId.cs │ └── Repositories │ └── IPersonRepository.cs ├── DbMigration ├── DbMigration.csproj ├── Program.cs ├── Scripts │ ├── 001 - CreateEventStore.sql │ └── 002 - PersonReadModel.sql └── appsettings.json ├── EventStoreTests ├── EventStoreProjectTests.csproj ├── Infrastructure │ └── IntegrationTestBase.cs └── Integration │ └── EventStoreIntegrationTests.cs ├── Infrastructure ├── Exceptions │ └── AggregateRootNotProvidedException.cs ├── Factories │ ├── ISqlConnectionFactory.cs │ └── SqlConnectionFactory.cs ├── Helpers │ ├── SkipPropertyAttribute.cs │ └── TypeExtensions.cs ├── Infrastructure.csproj ├── Model │ ├── EventStoreDao.cs │ └── ReadModels │ │ ├── PersonReadModel.cs │ │ └── ReadModel.cs └── Repositories │ ├── EventStoreRepository.cs │ ├── GenericRepository.cs │ ├── IEventStore.cs │ ├── IGenericRepository.cs │ ├── IPersonReadModelRepository.cs │ ├── IProjectionRepository.cs │ ├── PersonReadModelRepository.cs │ ├── PersonRepository.cs │ └── ProjectionRepository.cs ├── Projections ├── IProjection.cs ├── Projection.cs ├── Projections.csproj └── ProjectionsImplementations │ └── PersonProjection.cs ├── ProjectionsHost ├── Program.cs ├── ProjectionsHost.csproj └── Worker.cs ├── README.md └── RestAPI ├── Controllers └── PersonController.cs ├── Model ├── AddressDto.cs ├── GeneratePersonDTO.cs └── PersonDto.cs ├── Program.cs ├── Properties └── launchSettings.json ├── RestAPI.csproj ├── Services ├── IPersonService.cs └── PersonService.cs ├── Startup.cs ├── appsettings.Development.json └── appsettings.json /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/.gitignore -------------------------------------------------------------------------------- /CQRSExample.sln: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/CQRSExample.sln -------------------------------------------------------------------------------- /Core/Core.csproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Core/Core.csproj -------------------------------------------------------------------------------- /Core/Person/Address.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Core/Person/Address.cs -------------------------------------------------------------------------------- /Core/Person/DomainEvents/AddressChanged.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Core/Person/DomainEvents/AddressChanged.cs -------------------------------------------------------------------------------- /Core/Person/DomainEvents/DomainEvent.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Core/Person/DomainEvents/DomainEvent.cs -------------------------------------------------------------------------------- /Core/Person/DomainEvents/PersonCreated.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Core/Person/DomainEvents/PersonCreated.cs -------------------------------------------------------------------------------- /Core/Person/Person.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Core/Person/Person.cs -------------------------------------------------------------------------------- /Core/Person/PersonId.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Core/Person/PersonId.cs -------------------------------------------------------------------------------- /Core/Person/Repositories/IPersonRepository.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Core/Person/Repositories/IPersonRepository.cs -------------------------------------------------------------------------------- /DbMigration/DbMigration.csproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/DbMigration/DbMigration.csproj -------------------------------------------------------------------------------- /DbMigration/Program.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/DbMigration/Program.cs -------------------------------------------------------------------------------- /DbMigration/Scripts/001 - CreateEventStore.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/DbMigration/Scripts/001 - CreateEventStore.sql -------------------------------------------------------------------------------- /DbMigration/Scripts/002 - PersonReadModel.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/DbMigration/Scripts/002 - PersonReadModel.sql -------------------------------------------------------------------------------- /DbMigration/appsettings.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/DbMigration/appsettings.json -------------------------------------------------------------------------------- /EventStoreTests/EventStoreProjectTests.csproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/EventStoreTests/EventStoreProjectTests.csproj -------------------------------------------------------------------------------- /EventStoreTests/Infrastructure/IntegrationTestBase.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/EventStoreTests/Infrastructure/IntegrationTestBase.cs -------------------------------------------------------------------------------- /EventStoreTests/Integration/EventStoreIntegrationTests.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/EventStoreTests/Integration/EventStoreIntegrationTests.cs -------------------------------------------------------------------------------- /Infrastructure/Exceptions/AggregateRootNotProvidedException.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Infrastructure/Exceptions/AggregateRootNotProvidedException.cs -------------------------------------------------------------------------------- /Infrastructure/Factories/ISqlConnectionFactory.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Infrastructure/Factories/ISqlConnectionFactory.cs -------------------------------------------------------------------------------- /Infrastructure/Factories/SqlConnectionFactory.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Infrastructure/Factories/SqlConnectionFactory.cs -------------------------------------------------------------------------------- /Infrastructure/Helpers/SkipPropertyAttribute.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Infrastructure/Helpers/SkipPropertyAttribute.cs -------------------------------------------------------------------------------- /Infrastructure/Helpers/TypeExtensions.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Infrastructure/Helpers/TypeExtensions.cs -------------------------------------------------------------------------------- /Infrastructure/Infrastructure.csproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Infrastructure/Infrastructure.csproj -------------------------------------------------------------------------------- /Infrastructure/Model/EventStoreDao.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Infrastructure/Model/EventStoreDao.cs -------------------------------------------------------------------------------- /Infrastructure/Model/ReadModels/PersonReadModel.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Infrastructure/Model/ReadModels/PersonReadModel.cs -------------------------------------------------------------------------------- /Infrastructure/Model/ReadModels/ReadModel.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Infrastructure/Model/ReadModels/ReadModel.cs -------------------------------------------------------------------------------- /Infrastructure/Repositories/EventStoreRepository.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Infrastructure/Repositories/EventStoreRepository.cs -------------------------------------------------------------------------------- /Infrastructure/Repositories/GenericRepository.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Infrastructure/Repositories/GenericRepository.cs -------------------------------------------------------------------------------- /Infrastructure/Repositories/IEventStore.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Infrastructure/Repositories/IEventStore.cs -------------------------------------------------------------------------------- /Infrastructure/Repositories/IGenericRepository.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Infrastructure/Repositories/IGenericRepository.cs -------------------------------------------------------------------------------- /Infrastructure/Repositories/IPersonReadModelRepository.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Infrastructure/Repositories/IPersonReadModelRepository.cs -------------------------------------------------------------------------------- /Infrastructure/Repositories/IProjectionRepository.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Infrastructure/Repositories/IProjectionRepository.cs -------------------------------------------------------------------------------- /Infrastructure/Repositories/PersonReadModelRepository.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Infrastructure/Repositories/PersonReadModelRepository.cs -------------------------------------------------------------------------------- /Infrastructure/Repositories/PersonRepository.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Infrastructure/Repositories/PersonRepository.cs -------------------------------------------------------------------------------- /Infrastructure/Repositories/ProjectionRepository.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Infrastructure/Repositories/ProjectionRepository.cs -------------------------------------------------------------------------------- /Projections/IProjection.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Projections/IProjection.cs -------------------------------------------------------------------------------- /Projections/Projection.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Projections/Projection.cs -------------------------------------------------------------------------------- /Projections/Projections.csproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Projections/Projections.csproj -------------------------------------------------------------------------------- /Projections/ProjectionsImplementations/PersonProjection.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/Projections/ProjectionsImplementations/PersonProjection.cs -------------------------------------------------------------------------------- /ProjectionsHost/Program.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/ProjectionsHost/Program.cs -------------------------------------------------------------------------------- /ProjectionsHost/ProjectionsHost.csproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/ProjectionsHost/ProjectionsHost.csproj -------------------------------------------------------------------------------- /ProjectionsHost/Worker.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/ProjectionsHost/Worker.cs -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/README.md -------------------------------------------------------------------------------- /RestAPI/Controllers/PersonController.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/RestAPI/Controllers/PersonController.cs -------------------------------------------------------------------------------- /RestAPI/Model/AddressDto.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/RestAPI/Model/AddressDto.cs -------------------------------------------------------------------------------- /RestAPI/Model/GeneratePersonDTO.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/RestAPI/Model/GeneratePersonDTO.cs -------------------------------------------------------------------------------- /RestAPI/Model/PersonDto.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/RestAPI/Model/PersonDto.cs -------------------------------------------------------------------------------- /RestAPI/Program.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/RestAPI/Program.cs -------------------------------------------------------------------------------- /RestAPI/Properties/launchSettings.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/RestAPI/Properties/launchSettings.json -------------------------------------------------------------------------------- /RestAPI/RestAPI.csproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/RestAPI/RestAPI.csproj -------------------------------------------------------------------------------- /RestAPI/Services/IPersonService.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/RestAPI/Services/IPersonService.cs -------------------------------------------------------------------------------- /RestAPI/Services/PersonService.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/RestAPI/Services/PersonService.cs -------------------------------------------------------------------------------- /RestAPI/Startup.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/RestAPI/Startup.cs -------------------------------------------------------------------------------- /RestAPI/appsettings.Development.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/RestAPI/appsettings.Development.json -------------------------------------------------------------------------------- /RestAPI/appsettings.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bolicd/practicalcqrs/HEAD/RestAPI/appsettings.json --------------------------------------------------------------------------------