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

Warn on redundant AddEntityFramework* calls #19053

Closed
AndriySvyryd opened this issue Nov 25, 2019 · 0 comments
Closed

Warn on redundant AddEntityFramework* calls #19053

AndriySvyryd opened this issue Nov 25, 2019 · 0 comments
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. Servicing-approved type-enhancement
Milestone

Comments

@AndriySvyryd
Copy link
Member

If AddDbContext is called after AddEntityFramework* and the service provider is not configured as the internal service provider we should log a warning as this means that the services added are not used.

Also calling AddEntityFramework* first adds the EF-specific IMemoryCache, this is detrimental to other products using the same service provider: #12905 (comment)

@ajcvickers ajcvickers modified the milestones: 3.1.x, 3.1.2 Dec 2, 2019
AndriySvyryd added a commit that referenced this issue Dec 3, 2019
AndriySvyryd added a commit that referenced this issue Dec 3, 2019
@AndriySvyryd AndriySvyryd added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Dec 4, 2019
@AndriySvyryd AndriySvyryd removed their assignment Dec 4, 2019
@ajcvickers ajcvickers modified the milestones: 3.1.2, 3.1.1 Dec 10, 2019
AndriySvyryd added a commit to dotnet-maestro-bot/EntityFrameworkCore that referenced this issue Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. Servicing-approved type-enhancement
Projects
None yet
Development

No branches or pull requests

2 participants