© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
13 replies
Nacio

✅ EFCore cannot map another entity

I'm trying to move the relation so that the
DiscordUser
DiscordUser
has the
UserId
UserId
(and not
User
User
the
DiscordUserId
DiscordUserId
)
To do that, I've dropped the entire database since idc about it right now, got rid of all migrations but it keeps saying it can't map the
User
User


User: https://pastebin.com/ARS3JPiD
DiscordUser: https://pastebin.com/mBmUJpP5
DbContext: https://pastebin.com/ybtVHALe
Exception: https://pastebin.com/raw/0j8bsks6
Uncommenting the
[InverseProperty]
[InverseProperty]
also changes the exception to: https://pastebin.com/raw/6z7XswhM
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ [solved] efcore owned entity issue
C#CC# / help
12mo ago
✅ EFCore issues when removing an entity,
C#CC# / help
2y ago
❔ Automapper map Id to Entity
C#CC# / help
4y ago