C
C#2y ago
gio735

❔ EF core - unable to map collection to database

8 Replies
gio735
gio735OP2y ago
gio735
gio735OP2y ago
gio735
gio735OP2y ago
when I previously used ef-core it had no such error while trying to create migration tried to change it as List<string> (saving just Ids) but it gave same exception provider I'm using is sql server
gio735
gio735OP2y ago
it worked after I commented out this configuration:
gio735
gio735OP2y ago
someone please tell why was that problematic
Angius
Angius2y ago
Collections don't actually exist in the database It's the image that references the pizza, not the pizza that references multiple images You can't tell EF to configure maximum length of something that doesn't exist in the database
jcotton42
jcotton422y ago
To elaborate, collections in your model are just how EF enables navigation of relationships
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server