BeginTransaction return null connectionstring [closed]

public IDbTransaction BeginTransaction(string connectionName = "", bool useWadminUser =   false, IsolationLevel isolationLevel = IsolationLevel.ReadCommitted)
{
    using (DbConnection db = GetDbconnection(connectionName, useWadminUser))
    {
        db.Open();
        _dbTransaction = db.BeginTransaction();
    } <-- Here
    return  this._dbTransaction;
}

At the pointer above the connection is closed and disposed and the transaction with it. You cannot use transactions like that.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top