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 a static flag in EF that will be set when code is being executed for design-time discovery #28508

Merged
merged 3 commits into from
Jul 28, 2022

Conversation

ajcvickers
Copy link
Member

Fixes #27306.

@ajcvickers ajcvickers requested a review from bricelam July 25, 2022 15:09
@ajcvickers
Copy link
Member Author

@bricelam Is there a better way to test this?

Copy link
Contributor

@bricelam bricelam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also set it in DbContextActivator.CreateInstance.

src/EFCore.Design/Design/OperationExecutor.cs Outdated Show resolved Hide resolved
@bricelam
Copy link
Contributor

Is there a better way to test this?

This is exactly how I'd do it.

@ajcvickers
Copy link
Member Author

@bricelam New version up.

Copy link
Contributor

@bricelam bricelam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also set it in DbContextActivator.CreateInstance. That's is what ASP.NET Scaffolding uses at design-time.

@ajcvickers ajcvickers merged commit 56bfe7c into main Jul 28, 2022
@ajcvickers ajcvickers deleted the StopLookAndListen0725 branch July 28, 2022 17:27
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.

Add a static flag in EF that will be set when code is being executed for design-time discovery
2 participants