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

Throw meaningful exception when DbContext is already registered #2449

Merged
merged 5 commits into from
Feb 27, 2024

Conversation

sebastienros
Copy link
Member

@sebastienros sebastienros commented Feb 26, 2024

Fixes #744

Microsoft Reviewers: Open in CodeFlow

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-integrations Issues pertaining to Aspire Integrations packages label Feb 26, 2024
@sebastienros
Copy link
Member Author

Currently adding the IsDevelopment check which I forgot

@sebastienros
Copy link
Member Author

Updated

@eerhardt
Copy link
Member

The tests are broken now. 😦

@sebastienros
Copy link
Member Author

@eerhardt was an issue when a PR got merged to main, see #2451 for resolution.

@eerhardt
Copy link
Member

Assert.Equal() Failure
↓ (pos 62)
Expected: ···ered. Please ensure AddDbContext<TestDbContext>() is not invo···
Actual:   ···ered. Please ensure 'services.AddDbContext<TestDbContext>()' ···
↑ (pos 62)

@sebastienros sebastienros enabled auto-merge (squash) February 27, 2024 18:40
@sebastienros sebastienros merged commit 2cbacd4 into main Feb 27, 2024
8 checks passed
@sebastienros sebastienros deleted the sebros/scaffold branch February 27, 2024 18:52
@github-actions github-actions bot locked and limited conversation to collaborators Apr 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-integrations Issues pertaining to Aspire Integrations packages
Projects
None yet
2 participants