public void Detail(long id, Action <ProductDetail> result) { commandFactory.NewQuery(id).Exec(product => { result.Invoke(Assembler.Assembler.FromProductAggregation(product)); }, err => { result.Invoke(null); }); }
public void Dec(long id, Action <ProductDetail> success, Action <Exception> error) { commandFactory.NewQuery(id).Exec(product => { product.DecQuantity(shoppingRepository, shoppingRepositorySpecFactory, shoppingItemRepository, shoppingItemRepositorySpecFactory, decResult => { success.Invoke(Assembler.Assembler.FromProductAggregation(product)); }, error); }, error); }