示例#1
0
 public Task SaveAccountAsync(Account account)
 {
     return(Task.Factory.StartNew(() => {
         _accountRepository.Save(_accountEntityService.Map(account));
         _mqPublisher.Send(account, "Invoice", "account.add", "account.add");
         _mqPublisher.Send(account, "Order", "account.add", "account.add");
         // _mqPublisher.Send(account, "Invoice", "account.add", "account.add");
     }));
 }
示例#2
0
 public Task SaveOrderAsync(Order order)
 {
     return(Task.Factory.StartNew(() => {
         _orderRepository.Save(_orderEntityService.Map(order));
         _mqPublisher.Send(order, "order", "order.add", "order.add");
     }));
 }
 public Task SaveInvoiceAsync(Invoice invoice)
 {
     return(Task.Factory.StartNew(() => {
         _invoiceRepository.Save(_invoiceEntityService.Map(invoice));
         _mqPublisher.Send(invoice, "invoice", "invoice.add", "invoice.add");
     }));
 }
 public Task SaveCompanyAsync(Company company)
 {
     return(Task.Factory.StartNew(() => {
         _companyRepository.Save(_companyEntityService.Map(company));
         _mqPublisher.Send(company, "company", "company.add", "company.add");
     }));
 }
 public Task SaveProductAsync(Product product)
 {
     return(Task.Factory.StartNew(() => {
         _productRepository.Save(_productEntityService.Map(product));
         _mqPublisher.Send(product, "product", "product.add", "product.add");
     }));
 }