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?
Microsoft also has an Entity Provider for DB2, as part of their Microsoft Host Integration Server offering: http://msdn.microsoft.com/en-us/library/dn192288(v=bts.80).aspx
Good news: there is a nuget package from IBM you can use: http://www.nuget.org/packages/EntityFramework.IBM.DB2/
Enjoy!
Other news about EF 6 support for DB2
You can find official nuget package for EF support here http://www.nuget.org/packages/EntityFramework.IBM.DB2/
but it does not support migrations.
If you need migration you can use also this package (in addition to previous package)
https://www.nuget.org/packages/System.Data.DB2.EntityFramework.Migrations/
You can find more info here
https://db2ef6migrations.codeplex.com/
Regarding your questions:
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.