Entity Framework support features can be configured either in code using Devart.Data.DB2.Entity.Configuration.DB2EntityProviderConfig class or in the project .config file. The DB2EntityProviderConfig class is available in the Devart.Data.DB2.Entity.dll assembly. For example, this code is used to enable batch updates feature:
To configure Entity Framework provider with a config file, you need to add the following section to the configSections tag:
<configSections> <section name="Devart.Data.DB2.Entity" type="Devart.Data.DB2.Entity.Configuration.DB2EntityProviderConfigurationSection, Devart.Data.DB2.Entity.EF[Version], Version=1.6.127.0, Culture=neutral, PublicKeyToken=09af7300eec23701" /> </configSections>
Where [Version] is the version of the Entity Framework used. For Entity Framework v1 it is "1", for Entity Framework v4 and v5 it is "4", for Entity Framework v6 it is "6". For Entity Framework Core it is "Core".
If there is no configSections element in your config file, add it. It must be the first element. If it's not the first element, your application will throw an error when starting.
Then add the following element to the configuration tag:
<Devart.Data.DB2.Entity xmlns="http://devart.com/schemas/Devart.Data.DB2.Entity/1.0"> </Devart.Data.DB2.Entity>
And use the following elements of the Devart.Data.DB2.Entity tag to configure Entity Framework provider.
For more details on using DB2EntityProviderConfig class or configuring Entity Framework provider with a config file see the following topics: