On Fri, 2010-06-18 at 20:10 -0700, Erickson wrote:
> hello, i had this error "Operation is not valid due to the current
> state of the object" when trying to query using
> "context.SystemUsers.Single" but when using "context.SystemUsers" all
> records are retrieve

Documentation:

        http://msdn.microsoft.com/en-us/library/bb155325.aspx

Summary:

        Returns the only element of a sequence, and throws an exception
        if there is not exactly one element in the sequence.

Exceptions:

        InvalidOperationException:
                The input sequence contains more than one element.
                -or-
                The input sequence is empty.

Sounds like there is more than one row in context.SystemUsers, so
context.SystemUsers.Single() is (appropriately) throwing an exception.

 - Jon


-- 
You received this message because you are subscribed to the Google Groups 
"DbLinq" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/dblinq?hl=en.

Reply via email to