Add public APIs to configure shared type entities#21552
Add public APIs to configure shared type entities#21552smitpatel merged 1 commit intorelease/5.0-preview8from
Conversation
lajones
left a comment
There was a problem hiding this comment.
A few updates requested.
Also I don't see the changes for UsingEntity() and the generic "this is not the API you are looking for" exception. When you say this "resolves" 9914, is there still more work to come?
yes, therefore it is WIP. I wanted to get early eyes from @AndriySvyryd on this before I start adding overloads, but I just added overloads for OwnsOne/Many, HasOne/Many. UsingEntity is still pending. Still writing few more tests for presently added overloads. |
src/EFCore/Metadata/Conventions/DerivedTypeDiscoveryConvention.cs
Outdated
Show resolved
Hide resolved
|
Looking good so far |
|
@smitpatel As a general question, if a user calls the STET version of an API with a name and type of an existing non-STET Entity Type will you attempt to use that Entity Type, or error? If you use it will that put that Entity Type's CLR type into the list of shared CLR types? |
Error. |
|
We should discuss whether to follow the same pattern as with weak types: The first time Entity(type, name) is called it defines a normal entity type, but when it's called with the same type again that's when it becomes a STET. |
|
See team decision in #9914 (comment) |
|
This is just rebase & squash on latest. Will move out of draft once I update the PR for design meeting decision and ready for review. |
|
Updated. |
Resolves #9914