public async Task ExecuteAsync(AddProduct command) { var product = CreateProduct(command); await SaveAndCommitAsync(product); }
private static Product CreateProduct(AddProduct command) { return(new Product(command.Name, command.Description, command.Price)); }
public void Execute(AddProduct command) { var product = CreateProduct(command); SaveAndCommit(product); }