How to use Forced SQL caching for all queries

How to use Forced SQL caching for all queries

Postby jeroent » Mon 26 Jan 2009 13:36

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
jeroent
 
Posts: 12
Joined: Tue 25 Nov 2008 13:41

Postby AndreyR » Tue 27 Jan 2009 14:08

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();
      }
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby jeroent » Wed 28 Jan 2009 11:10

Tanks,

It works as expected!

Greetings

Jeroen
jeroent
 
Posts: 12
Joined: Tue 25 Nov 2008 13:41


Return to dotConnect for Oracle