Hello,
I am experiencing the same error in DB2 11.1 - Linux, It seems that error is related to the change in .Net Core 5. It started when I added Authentication with EF 5.
This is my original csproj file (it works with db2):
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<Platforms>x64</Platforms>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="log4net" Version="2.0.12"/>
<PackageReference Include="IBM.Data.DB2.Core" Version="3.1.0.400"/>
<PackageReference Include="IBM.EntityFrameworkCore" Version="3.1.0.400"/>
<PackageReference Include="cloudscribe.Pagination.Models" Version="1.1.0"/>
<PackageReference Include="cloudscribe.Web.Pagination" Version="3.1.0"/>
<PackageReference Include="Microsoft.Extensions.Logging.Log4Net.AspNetCore" Version="5.0.0"/>
</ItemGroup>
</Project>
And this is the new one that produced the problem:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<Platforms>x64</Platforms>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="log4net" Version="2.0.12"/>
<PackageReference Include="IBM.Data.DB2.Core" Version="3.1.0.400"/>
<PackageReference Include="IBM.EntityFrameworkCore" Version="3.1.0.400"/>
<PackageReference Include="cloudscribe.Pagination.Models" Version="1.1.0"/>
<PackageReference Include="cloudscribe.Web.Pagination" Version="3.1.0"/>
<PackageReference Include="Microsoft.Extensions.Logging.Log4Net.AspNetCore" Version="5.0.0"/>
<PackageReference Include="Microsoft.Extensions.Identity.Core" Version="5.0.3"/>
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.3"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.3"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.3"/>
<PackageReference Include="Microsoft.AspNetCore.Authentication.Core" Version="2.2.0"/>
</ItemGroup>
</Project>
Then, is there any workaround available for solve this problem?. I guess the only one for now is to downgrade to EF Code 3?
By the way this is the error:
TypeLoadException: Method 'Create' in type
'IBM.EntityFrameworkCore.Query.Internal.Db2SqlTranslatingExpressionVisitorFactory'
from assembly 'IBM.EntityFrameworkCore, Version=3.1.0.400, Culture=neutral,
PublicKeyToken=7c307b91aa13d208' does not have an implementation.
Thanks!
Jorge
------------------------------
Jorge Jarrin
Systems Enginner
Personal
------------------------------
Original Message:
Sent: Tue December 15, 2020 07:07 AM
From: Archana Soni
Subject: using IBM.EntityFrameworkCore 3.1.0.300 with AS400 i series DB2
Hi,
Thanks for contacting us. IBM EF Core 3.1.0.300 package supports IBM i series AS400 DB2 7.1 .
By looking at the error, it seems some compatibility issue. We did investigated further and figured out this issue has been reported by other users (for Different providers) to Microsoft.
Users had mixed application environment (Core 3.* and .NET5) which caused the issue, and reason is - there is change in .NET5 for create(..) api of IRelationalSqlTranslatingExpressionVisitorFactory Interface. Detailed info can be found here:
https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.query.irelationalsqltranslatingexpressionvisitorfactory?view=efcore-3.1#methods
Please verify if due to something, .NET 5 related dependencies are being pulled ?
If above suggestion doesn't resolve, Could you please elaborate more on the scenario ?
If possible full stack trace and content of *.csproj file Or sample application would be best to have a close look.
Best Regards,
Archana
------------------------------
Archana Soni
Original Message:
Sent: Mon December 14, 2020 11:05 AM
From: murat in
Subject: using IBM.EntityFrameworkCore 3.1.0.300 with AS400 i series DB2
Hi,
I have an issue with IBM.EntityFrameworkCore 3.1.0.300 IBM Data Server provider for Entity Framework Core. I downloaded and installed this nuget packages and i want to connect my AS400 DB2 databases but i have a message : "System.TypeLoadException: Method 'Create' in type 'IBM.EntityFrameworkCore.Query.Internal.Db2SqlTranslatingExpressionVisitorFactory' from assembly 'IBM.EntityFrameworkCore, Version=3.1.0.300, Culture=neutral, PublicKeyToken=7c307b91aa13d208' does not have an implementation."
i am not sure this driver support IBM i series AS400 DB2 7.1 version?
Does anyone have any advice on this issue.
thanks...
Driver: IBM.EntityFrameworkCore 1.3.0.100
Database: IBM i series AS400 Version:V7R1M0
OS: OS400 IDE: Visual Studio .Net 2019
------------------------------
murat in
------------------------------
#DataManagementGlobal
#DataServerDrivers