![]() |
VOOZH | about |
dotnet add package Devart.Data.DB2.EFCore --version 5.1.123.10
NuGet\Install-Package Devart.Data.DB2.EFCore -Version 5.1.123.10
<PackageReference Include="Devart.Data.DB2.EFCore" Version="5.1.123.10" />
<PackageVersion Include="Devart.Data.DB2.EFCore" Version="5.1.123.10" />Directory.Packages.props
<PackageReference Include="Devart.Data.DB2.EFCore" />Project file
paket add Devart.Data.DB2.EFCore --version 5.1.123.10
#r "nuget: Devart.Data.DB2.EFCore, 5.1.123.10"
#:package Devart.Data.DB2.EFCore@5.1.123.10
#addin nuget:?package=Devart.Data.DB2.EFCore&version=5.1.123.10Install as a Cake Addin
#tool nuget:?package=Devart.Data.DB2.EFCore&version=5.1.123.10Install as a Cake Tool
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.
For projects, using Entity Framework Core 10 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.
dotConnect for DB2 is available in several editions. See pricing options for ordering.
The NuGet package initiates the retrieval of an activation key from the Devart website. This key is required to activate the product for a free trial.
The following table show which version of this package to use with which version of frameworks.
| Frameworks | Version support |
|---|---|
| Entity Framework Core | 10 |
| .NET | 10 |
More information here
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);
}
}
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.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 5.1.123.10 | 26 | 6/17/2026 |
| 5.1.123.9 | 24 | 6/17/2026 |
| 5.1.123.8 | 24 | 6/17/2026 |
| 5.1.123.7 | 20 | 6/17/2026 |
| 5.1.123 | 29 | 6/17/2026 |
| 5.1.100.10 | 99 | 5/25/2026 |
| 5.1.100.9 | 95 | 5/25/2026 |
| 5.1.100.8 | 92 | 5/25/2026 |
| 5.1.100.7 | 97 | 5/25/2026 |
| 5.1.100 | 97 | 5/25/2026 |
| 5.1.72.10 | 151 | 4/23/2026 |
| 5.1.72.9 | 109 | 4/23/2026 |
| 5.1.72.8 | 106 | 4/23/2026 |
| 5.1.72.7 | 103 | 4/23/2026 |
| 5.1.72 | 116 | 4/23/2026 |
| 5.1.35.10 | 126 | 3/6/2026 |
| 5.1.35.9 | 123 | 3/6/2026 |
| 5.1.35.8 | 117 | 3/6/2026 |
| 5.1.35.7 | 119 | 3/6/2026 |
| 5.1.35 | 126 | 3/6/2026 |