谁能提供.NET CORE 连接 db2 数据库的 例子在线等等,如果解决问题令送分
目前我 .net core 连接 db2 数据库 总是存在问题,有没有厉害大牛提供一个例子,不胜感激。
以下是环境,总是存在问题:
db2 数据库组件:ibm.data.db2.core 版本(1.3.0.100)
ibm.EntityFrameworkCore(1.3.0.100)
db2 数据库: 安装的产品:DB2 Express-C - DB2COPY1, 版本:DB2/NT64 10.1.0
以下是EF CODE FIRST 命中遇到的错误提示,好像版本有问题一样
Add-Migration Initial
System.TypeLoadException: Method 'get_Info' in type 'IBM.EntityFrameworkCore.Infrastructure.Internal.Db2OptionsExtension' from assembly 'IBM.EntityFrameworkCore, Version=1.2.2.201, Culture=neutral, PublicKeyToken=7c307b91aa13d208' does not have an implementation.
at IBM.EntityFrameworkCore.Db2DbContextOptionsExtensions.UseDb2
at ConsoleApp1.Models.OderDbContext.OnConfiguring(DbContextOptionsBuilder optionsBuilder) in C:\Users\86186\source\repos\ConsoleApp1\ConsoleApp1\Models\OderDbContext.cs:line 18
at Microsoft.EntityFrameworkCore.DbContext.get_InternalServiceProvider()
at Microsoft.EntityFrameworkCore.Infrastructure.Internal.InfrastructureExtensions.GetService[TService](IInfrastructure`1 accessor)
at Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.CreateContext(Func`1 factory)
at Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.CreateContext(String contextType)
at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.AddMigration(String name, String outputDir, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigrationImpl(String name, String outputDir, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass3_0`1.<Execute>b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
Method 'get_Info' in type 'IBM.EntityFrameworkCore.Infrastructure.Internal.Db2OptionsExtension' from assembly 'IBM.EntityFrameworkCore, Version=1.2.2.201, Culture=neutral, PublicKeyToken=7c307b91aa13d208' does not have an implementation.
PM> Add-Migration Initial
以下是环境,总是存在问题:
db2 数据库组件:ibm.data.db2.core 版本(1.3.0.100)
ibm.EntityFrameworkCore(1.3.0.100)
db2 数据库: 安装的产品:DB2 Express-C - DB2COPY1, 版本:DB2/NT64 10.1.0
以下是EF CODE FIRST 命中遇到的错误提示,好像版本有问题一样
Add-Migration Initial
System.TypeLoadException: Method 'get_Info' in type 'IBM.EntityFrameworkCore.Infrastructure.Internal.Db2OptionsExtension' from assembly 'IBM.EntityFrameworkCore, Version=1.2.2.201, Culture=neutral, PublicKeyToken=7c307b91aa13d208' does not have an implementation.
at IBM.EntityFrameworkCore.Db2DbContextOptionsExtensions.UseDb2
at ConsoleApp1.Models.OderDbContext.OnConfiguring(DbContextOptionsBuilder optionsBuilder) in C:\Users\86186\source\repos\ConsoleApp1\ConsoleApp1\Models\OderDbContext.cs:line 18
at Microsoft.EntityFrameworkCore.DbContext.get_InternalServiceProvider()
at Microsoft.EntityFrameworkCore.Infrastructure.Internal.InfrastructureExtensions.GetService[TService](IInfrastructure`1 accessor)
at Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.CreateContext(Func`1 factory)
at Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.CreateContext(String contextType)
at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.AddMigration(String name, String outputDir, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigrationImpl(String name, String outputDir, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass3_0`1.<Execute>b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
Method 'get_Info' in type 'IBM.EntityFrameworkCore.Infrastructure.Internal.Db2OptionsExtension' from assembly 'IBM.EntityFrameworkCore, Version=1.2.2.201, Culture=neutral, PublicKeyToken=7c307b91aa13d208' does not have an implementation.
PM> Add-Migration Initial
...全文
相关推荐
C#2015连接DB2_11数据库的源代码
C#操作DB2的sample数据的增删改查,源代码。 执行带参数的执行增删改操作
Dot Net ADO数据库连接字符串
1 - SQL Server 2 - SQL Server 2005 3 - ACCESS, Oracle 4 - MySQL, Interbase, IBM DB2 5 - Sybase, Informix, Ingres, Mimer SQL, Lightbase, PostgreSQL, Paradox, DNS 6 - Firebird, Excel , Text, DBF / FoxPro, AS/400 (iSeries), Exchange, Visual FoxPro, Pervasive, UDL
IBM.DB2.dll各个版本
共享给各位开发者。用于C#连接DB2数据库。
JDBC连接数据库大全
这是JDBC连接数据库大全,希望对大家有所帮助
.net不需要客户端无客户端 连接Oracle数据库附代码
用这个dll,不需要装oracle客户


