I have entity that contain value-object with name IdCard
like this:
public class UserProfile : BaseEntity<long>
{
public byte Gender { get; private set; } = 0;
public int? BirthDate { get; private set; }
public IdCard IdCard { get; set; }
}
And IdCard
member like this:
public class IdCard : ValueObject
{
public int? Type { get; set; }
public string No { get; set; }
}
I need to make IdCard No
as index by using EF fluent api
some thing like this
builder.HasIndex(c => c.IdCard.No);