I was playing with vNext trying to figure out how does it handle object identity and found out that following construction always throws exception ("invalid command format" on the second foreach)
var query1 = <select>
var query2 = <select> (exactly the same as query1)
foreach (QueryObject object1 in query1)
foreach (QueryObject object2 in query2)
{
if (object1 == object2) Console.WriteLine( "tada" );
}

Does vNext support nested typed queries?
Mateus1223
Sorry for the delay in getting back to you. I've tried a very similar construct using the Northwind database, and didn't have any problems. Have you set any custom caching behaviour What are you doing before this code executes
Thanks
Erick
peterng25
Phil Gould
Are you still having this problem Please let me know.
I'm going to mark this thread as answered, but feel free to reactive it if needed.
Erick
gooon
Hello,
What are you running your query against Is the db.Shipment an Entity Model, or a dataset
Thanks,
Erick
wencey
Can you post the Connection String you are using And if possible, please post the stack trace as well.
Thanks,
Erick
Anthony_W
Hi, Is it possible that you are using the same physical connection to enumerate through both the results in the foreach When enumerating, internally we execute the equivalent TSQL command and via the Command-DataReader pattern as in ADO.Netv2. Since multiple execution on the same connection is not possible by default (as the MultipleActiveResultSet option is turned OFF by default), you might get an exception while executing/enumerating the second resultset. Can you share the full stack trace to make sure this is the case
Thanks, Sushil Chordia.