© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
1 reply
Murat_Suzen

❔ Ef Core Unique Index Problem

Hello guys, I'm looking for a solution for a problem. As seen in the pictures, I have FirmId, LCode fields for which I created Unique Index. My problem is that when I insert a data that is in the database, even though I send different data after getting an error, "Cannot insert duplicate key row in object 'dbo.Warehouses' with unique index 'IX_UNIQUE'. The duplicate key value is (1, TEST5)." i am getting the error. But the data I sent later (1, XXXXXXXX). Why is there such a problem?
5.png
4.png
3.png
2.png
1.png
6.png
7.png
8.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

❔ Unique Constraint Failed EF core
C#CC# / help
4y ago
❔ Ef Core Constructor problem
C#CC# / help
4y ago
❔ ef core foreign key problem
C#CC# / help
4y ago
EF Core
C#CC# / help
2y ago