c# - Persist one record at a time compared to the whole list at once -



c# - Persist one record at a time compared to the whole list at once -

i have take between 2 approaches.

persist list in info base of operations using mylist.foreach(p => doit(p));

-or-

use doit(mylist);

doit dal method in separate layer.

what utilize cases them?

i interested in resource usage , performance between these 2 scenarios. dal uses using create connection object everytime method called.

even if connection kept in connection pool, create , utilize connection in one-off (and in using block) because looping , re-calling connection each element of collection undoubtedly cost more.

although i'm not aware of inner workings @ time, internal checks on pool necessary see if connection still same beingness called, skipped if process list whole.

c# linq list generics

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -