Skip to content

Update CoreAdminConfigurationExtensions.cs FindDbContexts method to fix duplicated DbSets - #11

Merged
edandersen merged 2 commits into
edandersen:masterfrom
devantler:patch-1
Aug 28, 2021
Merged

Update CoreAdminConfigurationExtensions.cs FindDbContexts method to fix duplicated DbSets#11
edandersen merged 2 commits into
edandersen:masterfrom
devantler:patch-1

Conversation

@devantler

@devantler devantler commented Aug 26, 2021

Copy link
Copy Markdown
Contributor

Hey @edandersen, here is a fix for the duplicated DbSets. I've tested it to work locally in my own project, but I would appreciate it if you can test it with the demo! :-)

image

The fix was to check if the implementation type of discovered services already has been discovered before adding the DiscoveredDbContextType to the services.

Fixes #10

…ix duplicated DbSets

Hey @edandersen, here is a fix for the duplicated DbSets. I've tested it to work locally in my own project, but if you can test it with the demo that would be much appreciated! :-)

The fix was to ensure checking if the implementation type of discovered services already has been discovered prior to adding the DiscoveredDbContextType to the services.

Fixes #10
@edandersen

Copy link
Copy Markdown
Owner

Love it but going to need an update to remove "target-typed object creation" as that's C# 9.0 / .NET 5 + only and the library also builds against .NET Core 3.1. Thanks :-)

Comment thread src/DotNetEd.CoreAdmin/CoreAdminConfigurationExtensions.cs Outdated
@edandersen

Copy link
Copy Markdown
Owner

Lovely, merged! Thank you!

@edandersen
edandersen merged commit ae78858 into edandersen:master Aug 28, 2021
@edandersen

Copy link
Copy Markdown
Owner

Will be added to version 1.6.0 :)

@devantler
devantler deleted the patch-1 branch August 28, 2021 19:25
@devantler

Copy link
Copy Markdown
Contributor Author

Happy to help :-)

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.

Bug: Duplicated tables

2 participants