Page 1 of 1

How to use Forced SQL caching for all queries

Posted: Mon 26 Jan 2009 13:36
by jeroent
Hi,

I have just downloaded version 5.00.20. It state's that it's possible to Force SQL caching for all queries in the Entity Framework.
But I can't find in the documentation how to turn this on.

Can you show this with a code example?

Thanks,

Jeroen

Posted: Tue 27 Jan 2009 14:08
by AndreyR
Use code like the following:

Code: Select all

      Devart.Data.Oracle.Entity.OracleEntityProviderServices.CachedCommands = true;
      using (Entities db = new Entities()) {
        DEPT d = (from dept in db.DEPT
                  select dept).First();
      }

Posted: Wed 28 Jan 2009 11:10
by jeroent
Tanks,

It works as expected!

Greetings

Jeroen