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
Post a Comment