-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mapping attribute to create alternate keys #23153
Comments
I'm interested in working on this issue. |
@alam157 That's great! Do you have a use-case for this? Even the fluent API here is very rarely needed. |
Yes i have, so i need to create attribute |
@firmanalams There is already an attribute for creating unique indexes: https://learn.microsoft.com/en-us/ef/core/modeling/indexes?tabs=data-annotations#index-uniqueness This issue is about creating an alternate key in the EF model, which causes the model to have additional constraints over just using a unique index. |
Ultimately this will create a unique column (or group of columns) in the database which may or may not be used as the principal end of a relationship. In other words, it's a way to make a non-primary key column have a unique constraint without explicitly specifying a unique index.
This is not technically blocked on #4073, but should probably not be implemented until #4073 is fixed.
The text was updated successfully, but these errors were encountered: