EntityFrameworkCore wasn't disposing MySqlDataReader because MySqlDataReader doesn't inherit from DbDataReader.
Here is the exception thrown:
Microsoft.EntityFrameworkCore.DbContext:Error: An exception occurred in the database while saving changes.
MySql.Data.MySqlClient.MySqlException: There is already an open DataReader associated with this Connection which must be closed first.
at MySql.Data.MySqlClient.ExceptionInterceptor.Throw(Exception exception)
at MySql.Data.MySqlClient.MySqlCommand.CheckState()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
at MySql.Data.MySqlClient.MySqlTransaction.Commit()
at Microsoft.EntityFrameworkCore.Storage.RelationalTransaction.Commit()
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.d__1.MoveNext()
EntityFrameworkCore wasn't disposing MySqlDataReader because MySqlDataReader doesn't inherit from DbDataReader. Here is the exception thrown:
This commit fixes the issue.