Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for save changes async for issue #1 #2

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

togakangaroo
Copy link

Not sure what to do with EfHooks/EfHooks.Test (the non .Net 4.5 version). Since < 4.5 doesn't support the async keyword that project no longer compiles

Issue #1

@togakangaroo togakangaroo changed the title Add support for save changes async Add support for save changes async for issue #1 May 29, 2014
@togakangaroo
Copy link
Author

I tried to rewrite it without the await keyword but that's not going to fly since the 4.0 version of EntityFramework doesn't actually have a SaveChangesAsync to overwrite. Therefore the current strategy of using the same HookedDbContext file and compiling it in two different projects fails for the 4.0 version.

Possible solutions

  • Up the major revision number and drop support for .Net 4.0. This is what I did in this PR and frankly do you really want to support all old versions of .Net going forward?
  • Use something like t4 templates to generate HookedDbContext
  • Extract all common code that doesn't reference EntityFramework into a new "Core" project and then have each EFHooks project delegate responsibility for everything to a class in the Core. This means an extra dll for everything but is technically the neatest option.

My vote is still to drop support for old versions of .Net

@visoft
Copy link
Owner

visoft commented May 29, 2014

I'm up for dropping .NET 4 support at this point. EF6 for 4.5 is a different beast and should just be rewritten as a 4.5 assembly. For legacy support, users can keep using the current version for those using EF6 with .NET 4.

I haven't had a chance to review your code, but I think we can probably do a bunch of cleanup since we won't have .NET 4 support anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants