public void Elimina(InvoiceBE pItem) { try { using (TransactionScope ts = new TransactionScope()) { InvoiceDL Invoice = new InvoiceDL(); InvoiceDetailDL InvoiceDetail = new InvoiceDetailDL(); InspectionCertificateDL InspectionCertificate = new InspectionCertificateDL(); //INSPECTION CERTIFICATE DETAIL List <InvoiceDetailBE> lstInvoiceDetail = null; lstInvoiceDetail = new InvoiceDetailDL().ListaTodosActivo(pItem.IdInvoice); foreach (var item in lstInvoiceDetail) { InspectionCertificate.ActualizaSituacion(item.IdInspectionCertificate, 14); InvoiceDetail.Elimina(item); } Invoice.Elimina(pItem); ts.Complete(); } } catch (Exception ex) { throw ex; } }