public GetCustomerResponse GetCustomer(GetCustomerRequest request) { CustomerView view = new CustomerView(ObjectFactory.Create<IReadModelStore>()); CustomerDto dto = view.Load(request.CustomerId); GetCustomerResponse response = new GetCustomerResponse(); response.Customer = dto; return response; }
public CustomerFacade(IReadModelStore readModelStore) : base(readModelStore) {} public GetCustomerListResponse GetCustomerList(GetCustomerListRequest request) { CustomerView view = new CustomerView(ObjectFactory.Create<IReadModelStore>()); List<CustomerDto> list = view.GetList(request.Filter); GetCustomerListResponse response = new GetCustomerListResponse(); response.CustomerList = list; return response; }