© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
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#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
✅ [solved] efcore owned entity issue
C
C# / help
12mo ago
✅ EFCore issues when removing an entity,
C
C# / help
2y ago
❔ Automapper map Id to Entity
C
C# / help
4y ago