开发者

Adding an index to a LINQ query

开发者 https://www.devze.com 2023-02-23 15:06 出处:网络
I\'m trying to figure out how to add an index to a LINQ query to speed up searching var confirmation = (from p in _database.Participations where (p.accountID == bulletin.receiverID && p.event

I'm trying to figure out how to add an index to a LINQ query to speed up searching

var confirmation = (from p in _database.Participations where (p.accountID == bulletin.receiverID && p.eventID == @event.ID) select p).FirstOrD开发者_如何学编程efault();

I'd like to add an index on the p.eventID field

Thanks!


You will need to add the index to the column in the database.

Linq to XXX just generates SQL

0

精彩评论

暂无评论...
验证码 换一张
取 消