Entitiy Framework, add index to complex type column

EF 6.1 added a new IndexAttribute , however, if I have a complex Address type that is used in several objects (e.g. Person and Facility ) and I want to set the index to Person.Address.Street , what is the correct way to do this?

Obviously, the IndexAttribute property in the IndexAttribute property cannot work. Is there a free configuration? Is this script not supported at all? Will it be supported in the near future?

+6
source share
1 answer

The bit is late in the game, but I have a similar situation, and put the Index attribute for each property of a complex type - after this table check, it looks like they were all added as expected.

0
source

Source: https://habr.com/ru/post/969629/


All Articles