Q:

Entity Framework for DB2

I need to setup Entity Framework to work with a DB2 database. The main reason is to have nice object model instead of data sets and stored procedures.
The questions I have:

Does the version of EF matter? I'd like to use v6 but so far I found only references to v4.
Am I required to work with edmx file or can I also use DBContext (code first with an existing database)?
How should the configuration file look like?

A:

Regarding your questions:

The standard data provider for DB2 doesn't support EF6, Code-First, Code-First Migrations. In case, your scenario requires these features, you  should use third-party data providers.
Yes, you could use the DbContext class with the standard data provider via Database-First approach, i.e. without its Code-First/Code-First  Migrations functionality. 
It depends on the scenario and data provider being used. When working with the standard data provider it is enough to register the Entity Framework  provider in the DbProviderFactories section of the config file for deploying the application.
When working with EF6 and data providers, which support EF6, it is necessary to register the Entity Framework provider in the entityFramework section  additionally (for example, please refer to this article ).

Please take a look at our data provider dotConnect for DB2 with Entity Framework support (including EF6):
http://www.devart.com/dotconnect/db2/features.html
http://www.devart.com/dotconnect/db2/docs/
The DataDirect also provides a data provider for DB2 - http://www.datadirect.com/support/product-documentation/product-information/support-matrices/datadirect-connect-for-ado-net/entity-framework-data-providers , however, it doesn't provide support for Entity Framework  6. 

A:

Good news: there is a nuget package from IBM you can use:
http://www.nuget.org/packages/EntityFramework.IBM.DB2/
Enjoy!

