You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support single configuration for all uses of an owned type, shared type, or some arbitrary base class/interface #6787
Reacted by Shimmy Weitzhandler, Jason Barnes, Mark Visschers, Urtgard, pinkfloydx33, cthomesisaac, Felix Winterhalter, Thomas Ottenhus, David Ivkovic, IXthLegionHispana and 15 more
changed the title [-]Configure base class and/or interface of entity with Fluent API and reflection.[/-][+]Modeling: Bulk configuration based on unmapped base types[/+]on Oct 24, 2016
changed the title [-]Modeling: Bulk configuration based on unmapped base types[/-][+]Model Definition: Bulk configuration based on unmapped base types[/+]on Oct 24, 2016
Would really love to see this, are there any current plans to implement this a future version of EFCore?
Or are there new ways in EFCore 5 that I can use to get to the same result?
Currently using reflection to configure my interface derived entities, but like the Framework interface configuration way more.
@visschersm This issue is in the Backlog milestone. This means that it is not planned for the next release (EF Core 6.0). We will re-assess the backlog following the this release and consider this item at that time. However, keep in mind that there are many other high priority features with which it will be competing for resources.
Activity
rowanmiller commentedon Oct 17, 2016
We don't have the equivalent functionality in EF Core yet, but you can write something like this (less pretty, but does the same thing).
[-]Configure base class and/or interface of entity with Fluent API and reflection.[/-][+]Modeling: Bulk configuration based on unmapped base types[/+][-]Modeling: Bulk configuration based on unmapped base types[/-][+]Model Definition: Bulk configuration based on unmapped base types[/+]AndriySvyryd commentedon Apr 13, 2017
With this
modelBuilder.Owned<>()would be obsolete.Related to #3867
Superseeds #14047
chrispickford commentedon Sep 27, 2018
The workaround mentioned above doesn't seem to be working for inherited property definitions. I have the following statement in my
OnModelCreating():I'd expect this produce the following line in the migration for each
IEntity, but it does not:ajcvickers commentedon Sep 27, 2018
@chrispickford It works for me in a simple test:
chrispickford commentedon Oct 1, 2018
@ajcvickers Apologies, in my haste I constructed an incorrect example. The
IEntityshould be an abstract class, e.g:6 remaining items
visschersm commentedon Jan 12, 2021
Would really love to see this, are there any current plans to implement this a future version of EFCore?
Or are there new ways in EFCore 5 that I can use to get to the same result?
Currently using reflection to configure my interface derived entities, but like the Framework interface configuration way more.
ajcvickers commentedon Jan 12, 2021
@visschersm This issue is in the Backlog milestone. This means that it is not planned for the next release (EF Core 6.0). We will re-assess the backlog following the this release and consider this item at that time. However, keep in mind that there are many other high priority features with which it will be competing for resources.
AndriySvyryd commentedon Aug 20, 2021
Proposed API design: #12229 (comment)
ajcvickers commentedon Oct 27, 2021
Consider query filters when working on this. See #10257.