Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you have many objects that have quite a bit of data, it is possible for you to start chugging up memory usage. The DataContext stores all of the tracked changes in memory until you call SubmitChanges. I would recommend measuring your program's memory usage to see if this will be an issue for you. If memory is an issue, then yes you should call SubmitChanges so the DataContext can flush some of that information out of there.</p> <p>There are advantages and disadvantages to calling SubmitChanges in single call though. Let's say you really do have a lot of data and you are using a single SubmitChanges call. This will block on whatever thread it is on until its finished - and in some cases, that can be a very, very long time. This is bad if you want to do things like let the thread resume, report progress, or other side actions. In these cases you should call SubmitChanges periodically so you can let the thread resume processing other logic if it has any or needs to.</p> <p>If you really don't care how long it takes, it doesn't effect anything else, then a single SubmitChanges call is fine.</p> <p>In either case though, SubmitChanges still splits up each change into an individual command, and executes each command individually. So, it never does bulk or batch commands, it is always one-by-one, regardless if you make periodic calls to SubmitChanges, or a single call.</p> <p>The <a href="http://msdn.microsoft.com/en-us/library/Bb399378%28v=VS.90%29.aspx" rel="nofollow">MSDN page</a> on this will help you in understanding SubmitChanges just a bit better. There are other useful resources scattered around as well.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload