I have two properties (First Name & Last Name) that I want both to be unique so the Full Name is Unique in database, so I searched here for a solution and found this
Unique multiple column in EF6 codefirst
and I applied It
[Required]
[Index("IX_fullname", 1, IsUnique = true)]
public string f_name { get; set; }
[Required]
[Index("IX_fullname", 2, IsUnique = true)]
public string l_name { get; set; }
but it did not work at all.
The link provided of the solution is actually the same solution I provided the link of, and actually it did not work, I can do what I want with JSON and I did that with code but I can't handle it to show the message after leaving the text box immediately like "this value is required".