Example #1
0
        public Task Post(Guid id, [FromBody] string name)
        {
            var command = new UpdateManufactureCommand(id, name);

            _commandBus.ExecuteAsync(command).Wait();
            return(Task.CompletedTask);
        }
Example #2
0
        public Task ExecuteAsync(UpdateManufactureCommand command)
        {
            var productCategoryDomain = new ManufactureDomain(_writeService);

            productCategoryDomain.Update(new ManufactureDto
            {
                Id   = command.Id,
                Name = command.Name
            });

            _domainService.ApplyChanges(productCategoryDomain);
            return(Task.CompletedTask);
        }