Home > Cannot Be > Result Of A Query Cannot Be Enumerated

Result Of A Query Cannot Be Enumerated

Contents

Mimsy were the Borogoves - why is "mimsy" an adjective? c# share|improve this question edited Aug 6 '13 at 20:52 Niels Keurentjes 27k53989 asked Aug 6 '13 at 20:49 Nate Pet 10.2k83185309 Are you perhaps calling ToList (or any Would we find alien music meaningful? What do I do? news

Can I substitute decaf coffee for espresso Polyglot Anagrams Cops' Thread How do players remember all the various effects? share|improve this answer answered Sep 28 '11 at 19:04 Ladislav Mrnka 286k43526586 I modified it (EDIT 3) so that the result of idsThatMatch is cached in an array before I know that I could just generate one more IQueryable, but that seems wrong (I have more filters like this). Safety - Improve braking power in wet conditions What happens when a wizard tries to cast a cone of cold through a wall of fire? find more info

The Result Of A Query Cannot Be Enumerated More Than Once Store Procedure

What is a satisfactory result of penetration testing assessment? just a moment –andrerpena Sep 28 '11 at 18:52 I edited for clarity –andrerpena Sep 28 '11 at 18:55 add a comment| Your Answer draft saved draft discarded var search = context.Search_All("a", "b", "c", "d", "1", true) .ToList() .Select( item => new SearchResultModel { ID1 = item.ID1, ID2 = item.ID2, 1D3 = item.ID3, Name= item.Name, Name2= item.Name2}).ToList();

Is there still a way to prevent Trump from becoming president? more hot questions question feed lang-cs about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation Drawing a torso with a head (using \draw) Can I substitute decaf coffee for espresso Why is the 'You talking to me' speech from the movie 'Taxi Driver' so famous? The Query Results Cannot Be Enumerated More Than Once. Linq To Sql Not the answer you're looking for?

You will need to convert the resut to list by using .ToList() When you use .ToList(), all the items in the IEnumerable are processed and saved as a list. The Result Of A Query Cannot Be Enumerated More Than Once Entity Framework How does Gandalf end up on the roof of Isengard? Not the answer you're looking for? http://stackoverflow.com/questions/15340762/the-query-results-cannot-be-enumerated-more-than-once Ballpark salary equivalent today of "healthcare benefits" in the US?

i try to solve this error but its not fix when this error hase comes. The Result Of A Query Cannot Be Enumerated More Than Once. Iqueryable How would you model 'a sphere with a shell' like object? Can a text in Latin be understood by an educated Italian who never had any formal teaching of that language? more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed

The Result Of A Query Cannot Be Enumerated More Than Once Entity Framework

Can I use that to take out what he owes me? http://stackoverflow.com/questions/7587901/why-do-i-get-a-the-result-of-a-query-cannot-be-enumerated-more-than-once-when They didn't help much =/ thank you anyway –andrerpena Sep 28 '11 at 18:48 1 @AndréPena people can not be hanging in the air. The Result Of A Query Cannot Be Enumerated More Than Once Store Procedure The count isn't supposed to enumerate anything by the way. The Result Of A Query Cannot Be Enumerated More Than Once Mvc A story behind a weird inductor grep with special expressions Zener diodes in glass axial package - not inherently shielded from photoelectric effect?

share|improve this answer edited Dec 18 '13 at 21:41 answered Dec 18 '13 at 21:25 tschmit007 4,57311426 add a comment| Your Answer draft saved draft discarded Sign up or log navigate to this website How can I take a powerful plot item away from players without frustrating them? Why are wavelengths shorter than visible light neglected by new telescopes? Can floyd like bridge really make guitar out of tune when not blocked but not used Why "silver-tongued" for someone who is convincing? The Result Of A Query Cannot Be Enumerated More Than Once. Objectresult

Will I get the same result if I use 18-55mm lens at 55mm (full zoom) and 55-200mm lens at 55mm (no zoom), if not, then why? Because you're calling it in a loop, memIDs is being repeatedly enumerated. Should I report it? More about the author Would we find alien music meaningful?

public void GetSearchString() { Data.Database.FRCDatabaseDatacontext context = new Data.Database.FRCDatabaseDatacontext(); var result = context.GetSearchProcedure(txtName.Text); foreach (GetSearchProcedureResult search in result) if ( search.UserGuid == Workspace.Instance.ActiveUser.CurrentUserActiveDirectoryGuid) { lstName.ItemsSource = result.ToList(); } } This method Objectresult To List Non-Repetitive Quine Which word should I use for "to drive (a car)"? US Election results 2016: What went wrong with prediction models?

In this case, each time the foreach loop gets an item, the query retrieves the item from your db or whatever you are using, if you want to iterate again it

Once filtering is finished I will materialize the query and it will return just 10 records or so. –SoftwareFactor Dec 18 '13 at 16:57 Do you really need to What crime would be illegal to uncover in medieval Europe? Browse other questions tagged c# or ask your own question. Nullable Object Must Have A Value. Change foreach (var item in query) to foreach (var item in query.ToList()) share|improve this answer answered Apr 19 '11 at 22:47 Yakimych 12.7k43558 2 That worked!

Browse other questions tagged c# linq or ask your own question. Ballpark salary equivalent today of "healthcare benefits" in the US? Can you explain why it works? –Halcyon Apr 19 '11 at 22:52 2 @Halcyon it works because using ToList you are retrieving ALL results from the database in this list, click site Join them; it only takes a minute: Sign up EF 6: The result of a query cannot be enumerated more than once up vote 0 down vote favorite Is there any

share|improve this answer answered Sep 28 '11 at 18:43 Hasan Khan 25.2k1062104 no no.. if any one have a idea give me slutions.. The result of a query cannot be enumerated more than once The query results cannot be enumerated more than once?