Skip to content

Prevent evaluating Count() twice.#87

Open
Dmitry-Me wants to merge 1 commit intotroygoode:masterfrom
Dmitry-Me:doubleevaluation
Open

Prevent evaluating Count() twice.#87
Dmitry-Me wants to merge 1 commit intotroygoode:masterfrom
Dmitry-Me:doubleevaluation

Conversation

@Dmitry-Me
Copy link

IEnumerable.Count() will run the query twice if called twice http://stackoverflow.com/questions/5050326/why-is-ienumerable-count-reevaluating-the-query This caches the value to avoid reevaluation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant