8 The Oracle Entity Framework Data Provider : Configuring the Oracle Entity Framework Data Provider

Configuring the Oracle Entity Framework Data Provider
The Entity Framework data provider is based on the standard Oracle ADO.NET data provider. See Chapter 7 “The Oracle Data Provider” for detailed information on information common to both types of Oracle data providers. However, because of functionality that is provided by the Entity Framework, some configuration differences are required.
You can configure specific behavior for the Entity Framework data provider in several ways:
Modifying the app.config or web.config File
The app.config or web.config file contains information that can be added to configure performance and specific behaviors.
The product installer specifies default values for the Visual Studio 2008 and Visual Studio 2010 app.config and the EdmGen app.config files. If necessary, you can alter the default values in the configuration files. For example, you can specify how to filter schema objects available to the Entity Data Model (EDM) and whether to enable the use of the Enterprise Library Logging Application Block.
The performance and behavior of the EdmGen and Visual Studio tools, when using the Oracle Entity Framework data provider to create and manipulate ADO.NET Entity Data Models, can be affected by the data provider configuration options. For example, setting EdmSchemaRestrictions to User can improve performance, but may not display all the database objects that you need for your entity model.
The following code fragment shows the syntax and default values:
<ddtek.oracle.entity
   EdmSchemaRestrictions="User"
    EnableLoggingApplicationBlock="false"
   Workarounds="0"
/>
Filtering Schema Objects in the Entity Data Model
The EdmSchemaRestrictions configuration option applies when generating a model from a database. The option filters the schema objects that are returned when building the EDM that your application includes. Restricting the objects can also provide a performance improvement.
You can add or install the EdmSchemaRestrictions option entry in the app.config or web.config file.
When set to User (the default), only schema objects for which the current user is the owner are returned.
When set to AccessibleExcludingList, all the schema objects for which the current user has access are returned, less a predefined list of system-related schema
When set to Access, the model is built against a larger subset.
Using the Logging Application Block
The EnableLoggingApplicationBlock option specifies whether or not the Logging application block is enabled. Refer to the DataDirect Connect for ADO.NET Reference for information on using Logging Application Blocks.
Adding the Provider Schema Attribute
Provider is an attribute of the Schema element in the storage model file of an Entity Data Model (EDM). The storage model file is written in the store schema definition language (SSDL).
The Entity Data Model wizard assigns the value when you select the Oracle data provider. If you are manually defining an Entity Data Model, assign the string DDTek.Oracle to the Provider attribute of the Schema element, as shown in the following example:
<Schema Namespace="AdventureWorksModel.Store" Alias="Self" Provider="DDTek.Oracle" ProviderManifestToken="10g" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2006/04/edm/ssdl">