Shamil Salakhetdinov
shamil at smsconsulting.spb.ru
Sun Jan 9 09:55:07 CST 2011
Hi Gustav -- <<< However, if you have a crucial query in, say, a loop it could be worth the efforts. >>> Shouldn't LINQ be "smart enough" to not rebuild dynamic queries when that used in a loop? (of course if LINQ expression is not forcibly destroyed (by developer) at the end of every cycle iteration). I'd guess even if they get forcibly destoryed LINQ coudl somehow keep parsed&compiled LINQ expression cached... It's a very smart technology... (nothing new - all the principles used in (P)LINQ are known for years but that's the first time such a technology released to the business applications developers?) Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: 9 ?????? 2011 ?. 18:00 To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] LINQ Compiled Query Hi Shamil Yes, I noticed that comment and think it is valid. However, if you have a crucial query in, say, a loop it could be worth the efforts. /gustav >>> shamil at smsconsulting.spb.ru 09-01-2011 15:20 >>> Hi Gustav -- No, I didn't. One of comments says: "I feel this compiled query approach is cumbersome. Image your application has 100 linq queries, you have to create 100 helper classes, and another 100 static functions. I wish Microsoft provides an easily way, maybe some syntax sugar, or some more magics in DataContent, to make programmer life easier. " Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: 9 ?????? 2011 ?. 17:12 To: dba-vb at databaseadvisors.com Subject: [dba-VB] LINQ Compiled Query Hi all Has anyone tested this technique out: http://www.blog.ingenuitynow.net/15+Minutes+On+LINQ+Compiled+Queries.aspx It looks quite simple to implement. /gustav _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com