Skip to content

Call to Linq Count() on SqlSet returns an exception ConnectionString not initialized #22

Answered by maxtoroq
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

The query is deferred-executed, to query immediately use ToList() or ToArray(), then you don't have to worry about the connection going out of scope.

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by maxtoroq
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant
Converted from issue

This discussion was converted from issue #22 on December 08, 2020 23:32.