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

Remove dependency on EF Core "Issue26779" AppContext switch #1176

Merged
merged 2 commits into from Sep 6, 2022

Conversation

bkoelman
Copy link
Member

@bkoelman bkoelman commented Aug 6, 2022

EF Core v6.0.2 introduced a breaking change regarding change tracking of many-to-many relationships, which broke removing from many-to-many relationships in JsonApiDotNetCore in some cases. Fortunately, an AppContext switch to revert to the old behavior was added, which we've used since JsonApiDotNetCore v5.0.0.

The switch has been removed in EF (Core) 7. This PR fixes our code to no longer require the "Microsoft.EntityFrameworkCore.Issue26779" backward-compatibility switch. This unblocks us from upgrading to the latest preview version.

QUALITY CHECKLIST

…needs the Issue26779 EF Core back-compat switch. The switch is unavailable in EF 7, so this change unblocks us from upgrade.
@codecov
Copy link

codecov bot commented Aug 6, 2022

Codecov Report

Merging #1176 (6825c83) into master (0185311) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1176   +/-   ##
=======================================
  Coverage   92.58%   92.59%           
=======================================
  Files         241      241           
  Lines        7700     7709    +9     
=======================================
+ Hits         7129     7138    +9     
  Misses        571      571           
Impacted Files Coverage Δ
.../JsonApiDotNetCore/Configuration/JsonApiOptions.cs 100.00% <ø> (ø)
...Core/Repositories/EntityFrameworkCoreRepository.cs 99.31% <100.00%> (+0.02%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@bkoelman bkoelman requested a review from maurei August 6, 2022 09:50
@maurei maurei merged commit eed2ab1 into master Sep 6, 2022
@maurei maurei deleted the replace-ef-26779-switch branch September 6, 2022 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants