Skip to content

Commit 859d657

Browse files
Merge pull request #27 from how02/MySqlDataReader-Not-Disposed
Fixed MySqlDataReader not disposed by EntityFrameworkCore
2 parents b9ab494 + 232be20 commit 859d657

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Source/MySql.Data/datareader.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
namespace MySql.Data.MySqlClient
3838
{
3939
/// <include file='docs/MySqlDataReader.xml' path='docs/ClassSummary/*'/>
40-
public sealed partial class MySqlDataReader : IDisposable
40+
public sealed partial class MySqlDataReader : DbDataReader
4141
{
4242
// The DataReader should always be open when returned to the user.
4343
private bool isOpen = true;
@@ -1035,14 +1035,10 @@ private void Throw(Exception ex)
10351035
throw ex;
10361036
}
10371037

1038-
public new void Dispose()
1038+
protected override void Dispose(bool disposing)
10391039
{
1040-
Dispose(true);
1041-
GC.SuppressFinalize(this);
1042-
}
1040+
base.Dispose(disposing);
10431041

1044-
internal new void Dispose(bool disposing)
1045-
{
10461042
if (disposing)
10471043
{
10481044
Close();

0 commit comments

Comments
 (0)