public async Task HandleCommand(CreateSampleCommand command)
        {
            var sampleDto = new SampleDto {
                Name = command.Name
            };

            await service.InsertSample(sampleDto);
        }
コード例 #2
0
        public void Handle(CreateSampleCommand message)
        {
            _repository.SaveCommand(message);

            // For clarification if we need to store the event after the command.
            var item = new SampleModel(message.Id, message.CommandDate, message.CustomerId, message.SiteId, message.CommandType, message.CommandState, message.CommandData);

            _repository.SaveEvents(item, -1);
        }