Devart.Data.DB2.EFCore 4.2.193.8

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Devart.Data.DB2.EFCore --version 4.2.193.8                
NuGet\Install-Package Devart.Data.DB2.EFCore -Version 4.2.193.8                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Devart.Data.DB2.EFCore" Version="4.2.193.8" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Devart.Data.DB2.EFCore --version 4.2.193.8                
#r "nuget: Devart.Data.DB2.EFCore, 4.2.193.8"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Devart.Data.DB2.EFCore as a Cake Addin
#addin nuget:?package=Devart.Data.DB2.EFCore&version=4.2.193.8

// Install Devart.Data.DB2.EFCore as a Cake Tool
#tool nuget:?package=Devart.Data.DB2.EFCore&version=4.2.193.8                

dotConnect for DB2

dotConnect for DB2 is a high-performance ORM enabled data provider for DB2 that builds on ADO.NET technology.

The provider works with .NET Frameworks 2.0+, .NET Core 2.0+, .NET 5+. The product is compatible with ADO.NET Entity Framework (EF) Core.

It also includes visual ORM designer for Entity Framework, Entity Framework Core, and LinqConnect ORM models.

More information at dotConnect for DB2.

Installation


For projects, using Entity Framework Core 8 with DB2, install this package. Execute the following command in the Package Manager Console:

Install-Package Devart.Data.DB2.EFCore

For projects that require integration with Entity Framework 6.4 (EF6), use the Devart.Data.DB2.EF6 package.

There also are Visual Studio extensions for earlier Visual Studio versions. If you use some other tool than Visual Studio, you can get NuGet packages with the nuget.exe console tool.

License

dotConnect for DB2 is available in several editions. See pricing options for ordering.

To activate your license, please download dotConnect for DB2 from our website. This installer generates the trial key files required for using this package on a trial basis.

Compatibility


The following table show which version of this package to use with which version of frameworks.

Frameworks Version support
Entity Framework Core 8
.NET 9, 8

More information here

Usage


This snippet directly configures a DB2 database connection for an Entity Framework Core DbContext using a connection string.

public class MyDbContext : DbContext {
 
  protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) {

     optionsBuilder.UseDB2(@"UserId=db2admin;Password=mypassword;Server=db2:50000;Database=SAMPLE");
  } 
}

Configuration Using DB2Connection Instance

using Devart.Data.DB2;
...

public class MyDbContext : DbContext {
 
  protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) {

     var connection = new DB2Connection();
     connection.Server = "db2:50000"
     connection.UserId = "db2admin"
     connection.Database = "SAMPLE"
     connection.Password = "mypassword"
     optionsBuilder.UseDB2(connection);
  } 
}
ASP.NET Core and Blazor

Configuration File (appsettings.json):

{
  "ConnectionStrings": {
    "DefaultConnection": "UserId=db2admin;Password=mypassword;Server=db2:50000;Database=SAMPLE"
   }
}

DbContext Configuration:

public class MyDbContext : DbContext {
 
  protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) {

    IConfigurationBuilder builder = new ConfigurationBuilder().AddJsonFile("appsettings.json");
    IConfiguration configuration = builder.Build();
    optionsBuilder.UseDB2(configuration.GetConnectionString("DefaultConnection"));
  } 
}

For more information about secure connections read at our documentation.

Key Features

  • Direct Mode: Allows your application to work with DB2 directly, without additional libraries.
  • ASP.NET Core: Supports ASP.NET Core Identity.
  • Performance: Uses many DB2-specific performance features & optimizations to ensure the highest performance.
  • Monitoring: Allows per-component tracing of database events with a free dbMonitor application.
  • Security: Supports various encryption SSL and SSH connections, etc.
  • Support and updates: Enjoy dedicated support team for prompt issue resolution and regular updates to keep your software running smoothly and securely.

Support Area

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
4.2.193.9 72 2/11/2025
4.2.193.8 61 2/11/2025
4.2.193.7 58 2/11/2025
4.2.193 62 2/11/2025
4.2.191.9 73 1/15/2025
4.2.191.8 63 1/15/2025
4.2.191.7 63 1/15/2025
4.2.191 69 1/15/2025
4.2.190.9 82 12/27/2024
4.2.190.8 81 12/27/2024
4.2.190.7 88 12/27/2024
4.2.190 89 12/27/2024
4.1.104.8 112 11/8/2024
4.1.104.7 101 11/8/2024
4.1.104 108 11/8/2024
4.1.20.8 148 5/30/2024
4.1.20.7 113 5/30/2024
4.1.20 122 5/30/2024
4.1.10.8 196 1/18/2024
4.1.10.7 113 1/18/2024
4.1.10 121 1/18/2024
4.0.0.7 204 12/7/2023
4.0.0 143 12/7/2023