That totally depends on your code that how are you going to wire it. If you need I can send an example for each.
Sent wirelessly from my BlackBerry device on the Bell network. Envoyé sans fil par mon terminal mobile BlackBerry sur le réseau de Bell. -----Original Message----- From: "Fernando Nomellini" <[email protected]> Sender: [email protected] Date: Fri, 18 Mar 2011 17:15:07 To: <[email protected]> Reply-To: [email protected] Subject: Re: [DotNetDevelopment] Re: Is LINQ hits 500 times to database for 500 objects for inserting or in a single shot 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 -- 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
