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
加载中,请稍侯......
精彩评论