Data Management Global

 View Only

Getting started with IBM .NET Provider for .NET Core , .NET 5 and .NET 6

By Michelle Betbadal posted Wed April 29, 2020 03:26 PM

  
The new IBM .NET provider for .NET Core and .NET 5 / .NET 6 is for developing applications using MS .NET Core/.NET 5 / .NET 6 connecting to IBM data servers(namely LUW, IBM i, zOS and Informix)  and applications which run on Windows, Linux and MacOs. The IBM Data Server Providers  packages are available for download in the NuGet repository.

What is new in EF 6.0.0.300 and .NET 6 version 6.0.0.300
  • In EntityFramework , fix for DateTime casting while using ThenInclude() method in LINQ Query is included.
  • In .NET 6, fix for the memory corruption issue which leads to segmentation faults on Linux environments is included.

What is new in version 5.0.0.300

  • SAVEPOINT support in Transactions
  • Asynchronous support in Entity Framework.

What is new in version 3.1.0.400

  • Critical fixes to previously reported issues
  • Fix to license file issue when connecting from cloud environment to on premise database servers.

What is new in version 3.1.0.200   
  • Support for MS .NET Core 3.1
  • Code first support for Db2 for z/OS®
  • .NET Core driver on Microsoft Azure
  • Leverage new features of .NET core 2.1
  • .NET Core Driver support for Microsoft Windows Nano Server
  • Db2 .NET Core support on AWS
 

Instructions for downloading and using the package

    The following are the prerequisites for using the package

  • Any other IBM DB Drivers should not be present in the machine.
  • Path/LD_LIBRARY_PATH needs to be updated to include the package driver path.

     Apart from this, the download links and other commonly asked questions are listed in the Frequently Asked Questions. In cases where diagnostics needs to be collected for any issue, please follow the instructions on tracing.

 

Points to remember for using this package:

  • The license needed for connecting to DB2 databases remains the same as that of the DB2Connect for IBM databases.
  • There are separate packages for Windows and Linux and Mac.
  • Most of the features of MS ADO.NET like Connection, Command, DataReader and server specific data types are supported.
  • The ADO.NET features which are excluded in MS .NET Core are not available in IBM .NET Core.

 

Supported platforms and OS:

  • Windows 64-bit
  • Linux AMD64
  • macOS[new]

Supported IBM database servers

  • zOS
  • LUW including IBM dashDB
  • IBM I
  • Informix

Examples and samples

  • Writing a sample Console application using IBM .NET provider for .NET Core and using IBM databases. 
  • Writing a sample MVC application using IBM .NET provider for .NET Core and using IBM databases. 
  • Creating Azure Functions using IBM .NET Provider for .NET Core
  • Deploy a .NET Core or .NET 5 application on Red Hat Openshift environment.
  • Writing and hosting a .NET Core application using IBM dashDB on Bluemix

 VS2017 and VS2019 Support

          Creating .NET Core applications targeting DB2 databases using VS2017 and VS2019 is also supported. Please follow the Sample IBM DB application using VS2017 to create a sample test application with VS2017 as an example. Similar steps are applicable to VS2019 also.

 

Other features which are not yet there in this release

    Some of the features are not yet supported in this release. The Limitations page lists it.

 

Last updated On 18th October 2022







#DataManagementGlobal
#DataServerDrivers
14 comments
665 views

Permalink

Comments

Wed August 16, 2023 03:39 AM

Fri May 12, 2023 05:17 PM

I migrated from 3.1 to 6.0 and I have an issue every time I do Context.SaveChanges() after modifications made inside a Transaction using BOSContext.Database.BeginTransaction() .. It was working fine in 3.1. This is the error: IBM.Data.Db2.DB2Exception: 'ERROR [42601] [IBM][DB2] SQL0104N  An unexpected token "<END-OF-STATEMENT>" was found following "".  Expected tokens may include:  "ON UNIQUE".' 
Code example:

            using (var transaction = SomeContext.Database.BeginTransaction()){                
                try{
                    var obj = SomeContext.SomeTable.Where(x => x.SomeFieldId == 1).FirstOrDefault()
                    obj.SomeFieldToUpdate= "New Value"; 
                    if (SomeContext.SaveChanges() == 1) //=> Fails here!
                        transaction.Commit()                        
                } catch (Exception){
                    transaction.Rollback();
                    throw;
                }                
            }



Wed April 19, 2023 05:55 AM

Hi Ravin Sankardayal,
can you please start a new thread with this question so that we can have dedicated discussion. We tend to overlook any feature specific discussion here.
Thanks
Vishwa

Sun April 09, 2023 12:51 PM

I have a question regarding this DB2 error code.
I am using entity framework, the latest version.
Schema name is in upper case: TEST
Table name Pascal case: MyTestTable
Define Schema Name and Table Name in Model: [Table("MyTestTable", Schema = "TEST")].
When debugging I am receiving this error: "IBM.Data.Db2.DB2Exception (0x80004005): ERROR [42704] [IBM][DB2/NT64] SQL0204N  "TEST.MYTESTTABLE" is an undefined name."
Note table name is in upper case in error message, DB2 does not recognized the upper case table name.
Can someone assist?

Sun March 12, 2023 02:06 PM

Support for geometry is very spotty in this provider. Rather than returning a binary representation and allowing consumers to handle it themselves, the provider seems to turn the Geometry into WKT and leave out the SRID, which makes handling returned geometries impossible.

Sun February 26, 2023 11:48 AM

For some reasons, finding information about developing .net application to connect with Informix is very difficult. I started to develop an .net app using ODBC Ado.Net provider for .net core 3.1(through nuget package)

Later discovered that there is an Informix provider for ADO.Net through internet forums and old in our organization but very recently I understand it is part of Informix Client-SDK. 

First thing comes to my mind now is the names of the package for each .net versions are different. if some consistency is in the naming of package  , it will be better to be discovered. And also organizing way of the documentation can also be improved. 

Sun February 05, 2023 11:10 PM

Janani,
You can get a free login to an IBM i on pub400.com to test ppc64le to IBM i.

Mon December 12, 2022 05:34 PM

In .NET7 support was added for the ppc64le ( IBM Linux on Power) architecture ( https://community.ibm.com/community/user/powerdeveloper/blogs/janani-janakiraman/2022/11/07/net7-support-linux-on-power ).

What is the easiest platform for us to test connectivity from C# on ppc64le to a DB2 Server on a different architecture. What drivers are needed for us to test connectivity in the following scenarios:

  • C# on ppc64le accessing DB2 on Linux on AMD64
  • C# on ppc64le accessing the database server on IBMi ( assuming it is DB2 under the covers on IBMi)

Note: We have been able to test connectivity from .NET applications on ppc64le to database servers running on the SAME machine ( MySQL using ADO.NET connectors, MariaDB using ODBC, MongoDB using the native MongoDB.Driver, and to Sqlite using EntityFramework ).

Fri August 19, 2022 12:09 PM

Can you please add/include guidance on how to use the driver in MVC/Razor with calling stored procedures? TIA.

Thu June 02, 2022 01:57 AM

Hi Daniel, the Db2 .NET packages are for Win x64 and AMD64 on Linux. Support is there for macOS also and packages with -osx in NuGet are for macOS.

Wed May 04, 2022 09:44 AM

Is this x86 architecture only or does it support arm64 on unix/linux/Mac?

Fri July 17, 2020 03:43 AM

Hi Helmet,
 we stopped publishing to NuGet repository and latest packages are available only on IBM downloads.
Please refer to following blog for download information
https://community.ibm.com/community/user/hybriddatamanagement/blogs/vishwa-hs1/2020/07/12/db2-net-packages-download-and-configure

Thanks
Vishwa

Thu July 16, 2020 02:27 AM

NuGet repository is not up-to-date.

Tue June 30, 2020 05:10 PM

The links to the sample applications do not work.