Connecting to DB2 via .NET DbConnection

2019-05-17 02:05发布

问题:

Our current DB Connection provider model relies on database connectivity to use DbConnection (System.Data) based objects.

We can connect to DB2 (*Nix * Windows) via OdbcConnection, but we would like to allow the use of native DB2 Drivers.

Is there any way to do so (either .Net framework, OpenSource or (last choice) vendor) without breaking away from our current DAL model?

回答1:

There is another method not mentioned in the article above, and that is to use DbNetData which simplifies database access and has the ability to connect to DB2 from .NET. The source is hosted on CodePlex below:

DbNetData