Unique Constraint in Entity Framework Code First
As far as I can tell, there’s no way to do this with Entity Framework at the moment. However, this isn’t just a problem with unique constraints… you may want to create indexes, check constraints, and possibly triggers and other constructs too. Here’s a simple pattern you can use with your code-first setup, though admittedly … Read more