Giter Site home page Giter Site logo

Comments (11)

matthewjcooper avatar matthewjcooper commented on May 4, 2024

Getting the same issue with .Include queries.

from pomelo.entityframeworkcore.mysql.

caleblloyd avatar caleblloyd commented on May 4, 2024

I've noticed that it is only affecting me on Has Many includes, when including a relation that is a list of objects. Has One includes seem to work fine.

from pomelo.entityframeworkcore.mysql.

yukozh avatar yukozh commented on May 4, 2024

It seems that there is no way to enable MultipleActiveResultSets in MySQL, We should refactory the ADO Layer.

from pomelo.entityframeworkcore.mysql.

yukozh avatar yukozh commented on May 4, 2024

Hi @caleblloyd, @matthewjcooper, just try this:

If you have already installed the pomelo packages: Pomelo.Data.MySql and Pomelo.EntityFrameworkCore.MySql, please remove them and restore again(dotnet restore --no-cache). The packages are located in C:\Users\YOURNAME\.nuget\packages.

I suppose it is works now by a quick fix.

If the error still occurs, please reopen this issue.

from pomelo.entityframeworkcore.mysql.

yukozh avatar yukozh commented on May 4, 2024

@applenele Can you add this into unit tests?

from pomelo.entityframeworkcore.mysql.

tuanbs avatar tuanbs commented on May 4, 2024

I've been struggling with this issue. Thinking of moving back to SQL Server :(

from pomelo.entityframeworkcore.mysql.

mguinness avatar mguinness commented on May 4, 2024

@tuanbs Are you using the latest MyGet version? It appears that the MultipleActiveResultSets workaround is no longer needed.

from pomelo.entityframeworkcore.mysql.

tuanbs avatar tuanbs commented on May 4, 2024

@mguinness Yes, I still have this issue after trying get the latest MyGet version. Hope it could be fixed soon. Thanks.

from pomelo.entityframeworkcore.mysql.

yukozh avatar yukozh commented on May 4, 2024

@tuanbs Could you please open a new issue and provide us the full repro?

from pomelo.entityframeworkcore.mysql.

tuanbs avatar tuanbs commented on May 4, 2024

@yukozh I'll open it soon and reproduce the issue. Actually, I've just tried to run my project with SQL Server and got issue of

System.InvalidCastException: Unable to cast object of type 'System.Data.ProviderBase.DbConnectionClosedConnecting'
 to type 'System.Data.SqlClient.SqlInternalConnectionTds'.

So I guess my code's structure is to blame. I'm going to rewrite it and try with both SQL Server and MySql to see if it can be fixed. Thanks.

from pomelo.entityframeworkcore.mysql.

mguinness avatar mguinness commented on May 4, 2024

@yukozh It might also be worth creating an issue in the EF Core repo for that System.InvalidCastException in SQL Server. There was a similar error reported in Stack Overflow, are you getting the error because the DI context object has been closed and disposed?

from pomelo.entityframeworkcore.mysql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.