I'm using BulkInsert in my application to insert several tables that make up a single case in the database. I have wrap that in a Transactionscope and all works well except when there is a failure on one of the inserts. Everything rolls back which is great
but the exception is always "The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION." This does not provide enough information back to the user, is there something I can do to get the actual message of why the transaction failed?
using (var ctx = new x12EDI837I())
using (var transactionScope = new TransactionScope())
// some stuff in dbcontext
catch (Exception exception)