开发者

Adding an index to a LINQ query

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜