I'm looking for a way to create an index like this with Entity Framework 6.1:
CREATE INDEX [IX_MYINDEX] ON [db].[dbo].[Payments] ([IsDeleted])
INCLUDE ([Id], [InvoiceId], [OrderId])
I've found several other answers saying it can't be done because of the "Include" columns, but all of those answers are from 3 years ago so I wonder if something has been added that would make this into a possibility.
We'd like to avoid (if at all possible) to have real SQL in our code and prefer a real code-first solution where we annotate the Model-classes. I've tried Googling for it and I've spent some time reading different answers on Stackoverflow but can't seem to find the right fit. Can anyone point me in the right direction please?
Thank you very much
No, still not possible in EF6 and EF Core
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With