Пример #1
0
        public void Delete(IObjectIdentifier <ulong> id)
        {
            var command = new InvoiceDeleteCommand(_dataSource, id.Value);

            if (!command.Execute())
            {
                throw new ResourceNotFoundException(typeof(InvoiceEntity), id);
            }
        }
Пример #2
0
        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);
            }
        }