-
-
Save explorer14/2628dec5f7de6e9b6ed1355237ddcfa1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class OpenPurchaseOrderUseCase : IOpenPurchaseOrders | |
{ | |
public OpenPurchaseOrderUseCase( | |
IPurchaseOrderRepository purchaseOrderRepository, | |
IPublishPurchaseOrderEvents purchaseOrderEventPublisher) | |
{ | |
this.purchaseOrderRepository = purchaseOrderRepository; | |
this.purchaseOrderEventPublisher = | |
purchaseOrderEventPublisher; | |
} | |
void OpenNewPurchaseOrder(PurchaseOrderRequest input) | |
{ | |
// other code excluded for brevity | |
var newPurchaseOrder = Process(input); | |
purchaseOrderRepository.Create(newPurchaseOrder); | |
purchaseOrderEventPublisher.Publish(newPurchaseOrder.Events); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment