public void Delete(IObjectIdentifier <ulong> id) { var command = new InvoiceDeleteCommand(_dataSource, id.Value); if (!command.Execute()) { throw new ResourceNotFoundException(typeof(InvoiceEntity), id); } }
public void DeleteInvoice(DeleteInvoiceCM deleteInvoiceCM) { using (var connection = new DbConnectionProvider().CreateConnection()) { connection.Open(); var command = new InvoiceDeleteCommand { Connection = connection }; command.Execute(deleteInvoiceCM.DeleteInvoiceCMModelList.ToDataTableWithNull(), deleteInvoiceCM.DcNumber, deleteInvoiceCM.InvoiceNumber); } }