代码改变世界

the detach mechanism of linq

2012-03-15 10:28  slye  阅读(84)  评论(0)    收藏  举报

 The table that were used in linq to sql , some tables  may contain some foreigh key , the object for this talbe that linq produce in the .net will contain the property of parent object which foreigh key point to . when load data from this table . it will load the parent data if we use the parent object property .if we don't use in proprgarme it will load the parent data . but we sholud notcie ,we load the parent table data it were laod by each record ,not by batch . it may be lead to some perfonmacne problem .