>From a LINQ perspective, using a variable (var now=DateTime.Now) or embedding an expression (DateTime.Now) is really different.I understand the problem here, and it would require a bit of thought to solve it adequately (this would probably require to identifiy member access for non mapped properties. Consequences of this need to be taken in consideration, because there are probably side effects).
On Tue, Apr 21, 2009 at 16:28, <[email protected]> wrote: > > On Apr 21, 3:06 pm, Pascal Craponne <[email protected]> wrote: > > To avoid disabling caching, use a temporary variable, so the query will > > still be cached and the value passed as external parameter: > > while (true) { > > Hi Pascal, > > Thanks for the reply. > > I did think of that as well. My worry is that as I have Linq queries > using DateTime.Now in a few different places throughout my app > eventually I'll forget to create the temporary variable and cause some > nasty incidents. DBLinq is only taking around 16ms to generate the SQL > for my subsequent queries so that's acceptable for me. > > Regards, > > Greyman. > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DbLinq" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/dblinq?hl=en -~----------~----~----~----~------~----~------~--~---
