public AddNewItemSaleTransactionOutput AddNewItemSaleTransaction(AddNewItemSaleTransactionInput input) { return(new AddNewItemSaleTransactionOutput { Id = _itemSaleRepository.AddNewItemSaleTransaction(input.Sale.ConvertToItemSaleTransaction()) }); }
public int AddNewItemSaleTransaction(ItemSaleTransaction transaction) { var input = new AddNewItemSaleTransactionInput { Sale = new ItemSaleTransactionDto(transaction) }; using (var repo = new ItemSaleTransactionRepository()) { var app = new ItemSaleTransactionAppService(repo); return(app.AddNewItemSaleTransaction(input).Id); } }