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 overloads of UsingEntity() that could take a shared-type entity type #21505

Closed
lajones opened this issue Jul 3, 2020 · 6 comments
Closed
Assignees
Labels
area-model-building closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Milestone

Comments

@lajones
Copy link
Contributor

lajones commented Jul 3, 2020

No description provided.

@smitpatel
Copy link
Contributor

Part of #9914

@smitpatel
Copy link
Contributor

  • Remove exception throwing for STET when used during UsingEntity with clrType only.

@AndriySvyryd
Copy link
Member

To clarify, the only required overloads are:

EntityTypeBuilder UsingEntity(
    [NotNull] name,
    [NotNull] Func<EntityTypeBuilder, ReferenceCollectionBuilder> configureRight,
    [NotNull] Func<EntityTypeBuilder, ReferenceCollectionBuilder> configureLeft);

EntityTypeBuilder<TLeftEntity> UsingEntity(
    [NotNull] name,
    [NotNull] Func<EntityTypeBuilder, ReferenceCollectionBuilder> configureRight,
    [NotNull] Func<EntityTypeBuilder, ReferenceCollectionBuilder> configureLeft,
    [NotNull] Action<EntityTypeBuilder> configureAssociation);

If the specified name doesn't match any existing entity type then we'll assume the CLR type to be Dictionary<string, object> and create a new entity type

Other overloads will be implemented in #21535

@smitpatel
Copy link
Contributor

smitpatel commented Jul 9, 2020

@AndriySvyryd - #21552 adds overloads of UsingEntity which takes only name when generic and takes name & type when non-generic, just like any other place configuring relationship with STET.

Above overloads are non-generic and does not take type either (which you mentioned that we will assume Dictionary<string, object>. Do you want me to add them too?

@AndriySvyryd
Copy link
Member

The reason I chose these is that I don't expect other types to be used for STETs frequently. But these can be added later, along with #21535

@smitpatel
Copy link
Contributor

#21552 fixed this

@smitpatel smitpatel added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jul 21, 2020
@ajcvickers ajcvickers modified the milestones: 5.0.0, 5.0.0-rc1 Aug 14, 2020
@ajcvickers ajcvickers modified the milestones: 5.0.0-rc1, 5.0.0 Nov 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-model-building closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Projects
None yet
Development

No branches or pull requests

4 participants