I encountered a problem using multiple contexts of the same connection in EFCore. The error message was:The specified transaction is not associated with the current connection. Only transactions associated with the current connection may be used.

First of all, I tested it with reference to the following documents.
<https://learn.microsoft.com/en-us/ef/core/saving/transactions>

```
 public void Get()
        {
            var options = new DbContextOptionsBuilder<testContext>()
            .UseMySql("Server=127.0.0.1;User Id=test;Password=test123456!;Database=test")
            .Options;

            using (testContext con1 = new testContext(options))
            {
                using (var transaction = con1.Database.BeginTransaction())
                {
                    con1.User.Add(new User() { Address = "aaaaaaaaaaaaaaaaa", Name = "aaaaaa", Tel = "1111111111" });
                    con1.SaveChanges();

                    using (testContext con2 = new testContext(options))
                    {
                        con2.Database.UseTransaction(transaction.GetDbTransaction());

                        con2.Userbook.Add(new Userbook() { Bookbar = "232323", Bookname = "1212", Userid = 1 });
                        con2.SaveChanges();
                    }

                    transaction.Commit();

                }              
            }
        }

```

An error occurred while running to: con2. Database. UseTransaction (transaction. GetDbTransaction ()).

The specified transaction is not associated with the current connection. Only transactions associated with the current connection may be used.

First, in the demonstration code, the two context instances of CON1 and con2 use the same connection object options, which conforms to the relevant syntax of EFCore and is consistent with the official DEMO notation of the above links, but I don't understand why there was an error in adding the DbContext. Database. UseTransaction (DbTransaction) API to register two contexts in the same transaction. I hope someone can help me.