c# - Should I use MergeOption.NoTracking when I want to retrieve data just for display? -


lets want display data on webpage, load data:

using (kentities ctx = new kentities()) {     ctx.kset.mergeoption = mergeoption.notracking;      var items = (from c in ctx.kset                  c.parentid == 0                  select new                  {                      title = c.title,                      id = c.id,                                                 subs = ctx.kset.where(o => o.parentid == c.id)                                                        }).tolist();   } 

is there benefit using mergeoption.notracking?
if now, when should use it?

yes, if want data, use mergeoption.notracking. means wont stored in graph keeps track of entity updating , deleting. helps performance alittle in terms of memory.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -