I need a composite unique constraint for my entity's Name property, which is unique per Category (for which it has an FK).
So something like this:
entityTypeBuilder
.HasIndex(i => new { i.Name, i.Category.Id })
.IsUnique();
But this fails when I generate a migration, because of the Category.Id navigation property.
I know I can hardcode the values as strings, but I don't want to lose the static typing.
What options do I have?