-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grouped query does not return all rows #11861
Comments
Afaik, there is no known problem like that. It is hard to figure out what do you mean by return where you are just calling a func over the grouping key. |
In the first example the List named "symbols" is populated with 45282 strings. In the second example the method named "ForEachAsync" is called 10616 times (should be 45282). |
I am not able to see difference in data for my sample test. Can you provide a repro? |
will do asap, am two weeks behind on my project at the moment. |
Please see attached project. Tests fail for me 100% of the time using both MSSQL and MySQL. I'm not sure of the significance of adding dupe rows. I just did that to simulate my real project. |
@sam-wheat - The issue is the lambda passed to Is there a reason you need to pass in async lambda to |
@smitpatel Yes I need to await an async method call in that block. |
@sam-wheat - Let me rephrase is slightly. Do you need async lambda only. Or given that you can only pass sync lambda, you can call async method inside lambda like the way you call async from sync. |
My actual code is in the first post in this thread. I don't think I should call async code from sync block, it would be easier to just use a foreach loop on the query. I suggest Func<T,Task> as an argument for future versions of ForEachAsync. |
@sam-wheat You can workaround this by hand-coding the foreach loop, or creating your own version of ForEachAsync. You can use AsAsyncEnumerable to get an IAsyncEnumerable. |
I think that is the best choice for the immediate problem. |
Query below returns 45282 symbols:
Query below returns 10616 symbols:
Am I doing something obviously wrong? Is this a known problem for version 2.0.2? I will try to reproduce it in an example project if not.
The text was updated successfully, but these errors were encountered: