DbSet.Find method ridiculously slow compared to .SingleOrDefault on ID

Find calls DetectChanges internally, SingleOrDefault (or generally any query) doesn’t. DetectChanges is an expensive operation, so that’s the reason why Find is slower (but it might become faster if the entity is already loaded into the context because Find would not run a query but just return the loaded entity). If you want to use … Read more