0

How can I add a unique contraint to the AspNetUsers.UserName column using Entity Framework migrations? It seems like a jungle to me figuring out how the initial Identity tables are configured.

Marius
  • 1
  • 1

1 Answers1

0

To make the column unique you can use Data Annotations and the attribute [Index(IsUnique=true)] in your code. Please see this Post by @juFo for more information.

Correia7
  • 364
  • 3
  • 10