© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
30 replies
Elio

❔ Unique Constraint Failed EF core

Hi, i tried to add a new program bending with a userId but I've this following error and i do not understand why because in my database i didn't set unique value for the UserId even if it is an foreign key
image.png
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

✅ UNIQUE constraint failed
C#CC# / help
13mo ago
❔ Ef Core Unique Index Problem
C#CC# / help
3y ago
EF Core
C#CC# / help
2y ago