-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Migrations: SQL Server Filtered Indexes #5817
Copy link
Copy link
Closed
Labels
good first issueThis issue should be relatively straightforward to fix.This issue should be relatively straightforward to fix.help wantedThis issue involves technologies where we are not experts. Expert help would be appreciated.This issue involves technologies where we are not experts. Expert help would be appreciated.
Milestone
Metadata
Metadata
Assignees
Labels
good first issueThis issue should be relatively straightforward to fix.This issue should be relatively straightforward to fix.help wantedThis issue involves technologies where we are not experts. Expert help would be appreciated.This issue involves technologies where we are not experts. Expert help would be appreciated.
Type
Fields
Give feedbackNo fields configured for Feature.
For indexes on SQL Server, it should be possible to set a filter might as string or lamda expression:
modelBuilder.Entity<Blog>().HasIndex(b => b.Url, "[Url] IS NOT NULL AND [IsActive] = 1");or
modelBuilder.Entity<Blog>().HasIndex(b => b.Url, b => b.Url != null && b.IsActive == 1);