We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently, it's possible to ensure field uniqueness like this:
protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity<Model>() .HasIndex(m => m.Field) .IsUnique(); }
I'm not sure about other ways.
My proposition is to add [Unique] data annotation to simplify this process.
The text was updated successfully, but these errors were encountered:
@midnightstarr There has been a suggestion for an Index attribute in the past. I think Unique would be part of that. So closing as a dupe of #4050.
Index
Unique
Sorry, something went wrong.
No branches or pull requests
Currently, it's possible to ensure field uniqueness like this:
I'm not sure about other ways.
My proposition is to add [Unique] data annotation to simplify this process.
The text was updated successfully, but these errors were encountered: