[solved] Csla 3.5 and LINQ / linqbindinglist bug

[solved] Csla 3.5 and LINQ / linqbindinglist bug

Old forum URL: forums.lhotka.net/forums/t/4226.aspx


Skafa posted on Thursday, January 24, 2008

Ignore: my bad... I made a typo...

Hey Rocky,

Im trying to do the following:

                var item = from c in this
                           where c.Key == key
                           select c;
                return item.Single().Value;

But it fails with an Exception:
System.InvalidOperationException: Sequence contains no elements

When I debug, the item variable (a LinqBindingList), dóes contain one element (_list / SourceList / _bindingList all contain 1 element).

What's wrong here?

Copyright (c) Marimer LLC