© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
35 replies
Kroks

❔ EFCore: Unique Category Name

I have an issue with the entity "Category" that I have.
Each "Target" Entity can have several categories, each category has a name and an Id.
Target Entity has a List of Categories, however now when trying to add categories to an Entity there are duplicates.
If I have two entities and add a category with the same name to both, there will be a dupe category (as the name exists two times and the name of Category entity should be unique)
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

❔ EFCore: Duplicate key violates unique constraint
C#CC# / help
3y ago
❔ How do I access Category Name ?
C#CC# / help
3y ago
SQL EFCore
C#CC# / help
2y ago
❔ efcore querying
C#CC# / help
3y ago