I need to add unique constraint on column allowing null which can be achieved using the following query:
CREATE UNIQUE NONCLUSTERED INDEX idx_yourcolumn_notnull
ON YourTable(yourcolumn)
WHERE yourcolumn IS NOT NULL;
How can I achieve it using Entity Framework code first approach ?
Indexattribute which could be applied to the property of the entity... But unfortunately, there is noConditionproperty for this attribute