I have created two ways to query the requested movies by country:
Initially my approach was the following:
As stated in the second Assertions, when Russia and Japan passed, the resulted movie collection should have 1237 records, however my result was 1245. However the integration test passed and I got a correct validation code.
After some thought I noticed that I have used .ToList() twice which isn’t very optimized.
So I used my second approach
The resulted movie collection had 1237 records.
My question is why the two approaches produced different result? any ideas will be well appreciated.
Thank you in advance.