LINQ in Action roller

Enumerating a Linq to Sql query more than once, not allowed??

hi, in May CTP, i had this code and it ran fine, although it does cause a double enumeration which is not necessary: Code Snippet IEnumerable<Options_SELECTResult> results = this.Options_SELECT(Key); if (results.Count() == 0) return null; else return results.First().Value; now when i run this with the new LINQ 2.0.0.0 assemblies shipped with Orcas Beta 1, i get the following error. [InvalidOperationException: The query results cannot be enumerated more than once.] System.Data.Linq.SqlClient.SqlOneTimeEnumerable`1.GetEnumerator() Read More...
Published Monday, April 30, 2007 12:45 PM by MSDN Forums: LINQ Project General
Anonymous comments are disabled

Featured Item

This Blog

Sponsoring

Syndication