Extending Entity Framework Functionality
- Last Updated: April 16, 2026
- 3 minute read
- ADO.NET
- Documentation
The Entity Framework offers powerful productivity gains by masking many ADO.NET features, simplifying application development. DataDirect Connect for ADO.NET Entity Framework data providers include functionality designed to optimize performance.
Configuration Options
The Entity Framework data provider defines options that configure performance and specific behaviors. These options exist in the machine.config, devenv.exe.config, edmgen.exe.config, app.config, and/or the web.config file.
The performance and behavior of the EdmGen and Visual Studio tools, when using the 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.
Specifying Data Provider Version Information in the .config File
To accommodate differences between earlier releases of the Entity Framework data provider, you can specify versioned configuration options in the configuration files. By default, non-versioned configuration entries apply to the latest release installed. Configuration options applicable to older releases must contain a version-specific identifier.
Suppose you have installed both Release 4.0 and Release 3.5 of the Oracle Entity Framework data provider. In the following example, the value of the edmSchemaRestrictions configuration option is set to User for Release 3.5, and to Accessible for Release 4.0.
<ddtek.oracle.entity.3.5
edmSchemaRestrictions="User"
/>
<ddtek.oracle.entity
edmSchemaRestrictions="Accessible"
/>
Registering the provider in the application config file to work with EF6
After installing EF6, trying to fetch a database model using the EDM wizard provider displays a pop-up window with Entity Framework version options, instead of the database schema information. To avoid this you must configure the provider information in the app.config file.
EF6 is supported only by DB2 and Oracle, and you must add the information in the app.config file only for these providers.
-
For DB2, enter the following line of code inside the providers tag:
<provider invariantName="DDTek.DB2" type="DDTek.DB2.Entity.DB2ProviderServices, DDTek.DB2.Entity, Version=4.3.0.0, Culture=neutral, PublicKeyToken=c84cd5c63851e072" /> -
For Oracle, enter the following line of code inside the providers tag:
<provider invariantName="DDTek.Oracle" type="DDTek.Oracle.Entity.OracleProviderServices, DDTek.Oracle.Entity, Version=4.3.0.0, Culture=neutral, PublicKeyToken=c84cd5c63851e072"/>
Specifying Enterprise Library Version Information in the .config File
You can specify in the .config file which version of the Enterprise Library that you want to use. By default, the data providers are configured to use Enterprise Library 6.0. However, if want to continue using Enterprise Library 5.0, you can do so by modifying the .config file.
For example, to target the Enterprise Library 5.0 Logging Application Block, add the following entry:
<ddtek.db2.entity LABAssemblyName="Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
Designing an Entity Data Model
Building large models with the Entity Data Model (EDM) can be very inefficient. For optimal results, consider breaking up a model when it has reached 50 to 100 entities. In addition, carefully consider which objects are actually needed in the model.
To restrict or expand the database objects available to you when generating a model, use the edmSchemaRestrictions configuration option. 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.
The following configuration option entry for the Oracle Entity Framework data provider limits the objects available for the model to those for which the current user is the owner:
<ddtek.oracle.entity
edmSchemaRestrictions="User"
/>
Refer to DataDirect Connect Series for ADO.NET User’s Guide for information for your Entity Framework data provider.
Logging Application Block Support
Applications that use the standard Logging Application Block (LAB) from the Microsoft Enterprise Library Version 6.0 or Version 5.0 and the related design patterns can quickly display the SQL generated as part of the DataDirect Connect data providers for ADO.NET Entity Framework.
For more information, see Logging Application Blocks.