public static bool AprobarCredito(int pCreditoId) { var usuario = VendixGlobal<int>.Obtener("UsuarioId"); using (var scope = new TransactionScope()) { try { using (var db = new VENDIXEntities()) { db.usp_Credito_Upd(1, pCreditoId, usuario); } scope.Complete(); return true; } catch (Exception) { scope.Dispose(); throw; } } }