What he wants to know is in an INSERT situation, the example below is a Select. 
this will of course be one connection and only one SQL statement.

The question is : if I insert 500 new objects customers in my context and then 
SaveChanges, how many commands will be send to the Database ?

In MY opinion, 500 insert comands will be send. But it is only a wild guess.

Fernando Nomellini


--------------------------------------------------
From: "Stephen Russell" <[email protected]>

> On Fri, Mar 18, 2011 at 7:28 AM, [email protected]
> <[email protected]> wrote:

>> My question was ,, if there are 500 objects in a collection, then how
>> many time LINQ will round trip from database, it will be 500 or just
>> in a single go
> -----------------------------
> 
> var customers = (from c customer in Entity.Customer
>                          select c ).ToList() ;
> 
> and customers.count = 500  that is only one connection not 500.

-- 
You received this message because you are subscribed to the Google
Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
Web Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
or visit the group website at http://megasolutions.net

Reply via email to