Last active
December 1, 2019 18:30
-
-
Save DannyRusnok/20a8b5ed6e961354f5bb7f9b5ef4e997 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 OrdersFacade{ | |
private IExternalCustomerApiService customerApiService; | |
private IOrderRepository orderRepository; | |
... | |
public OrdersFacade( | |
IExternalCustomerApiService customerApiService, | |
IOrderRepository orderRepository, | |
... | |
) | |
{ | |
this.customerApiService = customerApiService; | |
this.orderRepository = orderRepository; | |
... | |
} | |
public bool CreateOrder(){ | |
... | |
var customerInfoInJson = customerApiService.GetCustomerInfo(customerId); | |
var customerInfo = JSonConvert.Serialize(customerInfoInJson); | |
order.CustomerName = customerInfo.Name; | |
orderRepository.Save(order); | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment