Skip to content

Add HasData seeding example for many-to-many relationship #2879

@maumar

Description

@maumar

When using many-to-many with generated join entity, the exception we throw is not great, e.g.:

The seed entity for entity type 'Tag' cannot be added because it has the navigation 'Posts' set. To seed relationships,  add the entity seed to 
'PostTag (Dictionary<string, object>)' and specify the foreign key values {'TagsTagId'}.

all these are generated by EF so it might be nice to show people how to do this (or maybe throw better exception for m2m with generated join entity?)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions