Giter Site home page Giter Site logo

Comments (9)

JonPSmith avatar JonPSmith commented on May 26, 2024

Bit more information on this error:

If you follow the http://go.microsoft.com/fwlink/?LinkId=287068 link then it explains what is going on, i.e. EF v6 brought in a new Interface for Async. The interesting thing is the page also provides an idea of what is needed in a section on Unit Testing Async.

Now I'm willing to have a go at this as its a deal-breaker for my GenericServices library, which supports sync and async versions of all CRUD operations. The async/await feature introduced in .NET 4.5 and is very important.

Problem is, where do I start? Any advice gratefully received.

from delegatedecompiler.

hazzik avatar hazzik commented on May 26, 2024

The problem here that IDbAsyncQueryProvider / IDbAsyncEnumerable interfaces are defined in EF
assembly, and not in BCL

from delegatedecompiler.

hazzik avatar hazzik commented on May 26, 2024

It can be fixed with .NET 4.6 [AssemblyNeutral], but anyway it means
dropping support of .NET 4.5 and below. Or we higly tie it with EF. Both
are not an option.

from delegatedecompiler.

hazzik avatar hazzik commented on May 26, 2024

Another option: to have "DelegateDecompiler.EF" adapter.

from delegatedecompiler.

JonPSmith avatar JonPSmith commented on May 26, 2024

Hi @hazzik. Thanks for looking at that. I agree you don't want to be too tied to EF so an DelegateDecompiler.EF is a great idea. I am happy to look at this. From your research where should I look at inside DelegateDecompiler?

from delegatedecompiler.

daveaglick avatar daveaglick commented on May 26, 2024

I just added another commit to my PR that should resolve this issue. See the PR comments for more details.

Of note - you will need to drop your test database if it's already been created because the namespace move for the EF test project results in different migration names. If you don't recreate the test database, EF will think it's missing migrations because it'll see the ones with the old namespace in their name,

from delegatedecompiler.

hazzik avatar hazzik commented on May 26, 2024

Fixed in #31

from delegatedecompiler.

hazzik avatar hazzik commented on May 26, 2024

Package is live https://www.nuget.org/packages/DelegateDecompiler.EntityFramework

from delegatedecompiler.

JonPSmith avatar JonPSmith commented on May 26, 2024

Hi @hazzik and @somedave,

Awesome. Just upgraded GenericServices to the new DelegateDecompiler.EntityFramework framework and async works. I also see from the generated documentation that it now supports all the various nullable tests, which is also great.

One question/comment: I could imagine a situation where you need both the DelegateDecompiler namespace and the DelegateDecompiler.EntityFramework, at which point you get an 'ambiguous reference' compile error. Dave did suggest another name, like DecompileEf or something. Is it a good idea to change things now before people start using it??

from delegatedecompiler.

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.