예제 #1
0
        public async Task ExecuteAsync(AddProduct command)
        {
            var product = CreateProduct(command);

            await SaveAndCommitAsync(product);
        }
예제 #2
0
 private static Product CreateProduct(AddProduct command)
 {
     return(new Product(command.Name, command.Description, command.Price));
 }
예제 #3
0
        public void Execute(AddProduct command)
        {
            var product = CreateProduct(command);

            SaveAndCommit(product);
        }