How to use Forced SQL caching for all queries

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
jeroent
Posts: 12
Joined: Tue 25 Nov 2008 13:41

How to use Forced SQL caching for all queries

Post by 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

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by 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();
      }

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

Post by jeroent » Wed 28 Jan 2009 11:10

Tanks,

It works as expected!

Greetings

Jeroen

Post Reply