DbSet.Find method ridiculously slow compared to .SingleOrDefault on ID
问题 I have the following code (Database is SQL Server Compact 4.0): Dim competitor=context.Competitors.Find(id) When I profile this the Find method takes 300+ms to retrieve the competitor from a table of just 60 records. When I change the code to: Dim competitor=context.Competitors.SingleOrDefault(function(c) c.ID=id) Then the competitor is found in just 3 ms. The Competitor class: Public Class Competitor Implements IEquatable(Of Competitor) Public Sub New() CompetitionSubscriptions = New List(Of