I use Entity Code first in my solution. Lets say I already have a primary key in my table (projectID) but I would like another field to be unique (SlugName). How can I achieve this?
Here is my entity:
[Key]
public int ProjectID { get; set; }
public string Name { get; set; }
public string SlugName { get; set; }
Thanks.