I have an entity like this:
public class User
{
public string Name { get; set; }
public string LastName { get; set; }
public string Username { get; set; } // this is an EmailAddress
[Key]
public Guid Id { get; set; }
}
How can I define the Username
to be unique too?
Using Entity Framework 6.1.3