Ormlite issue with latest Npgsql

I need to use entity framework on ServiceStack .net core api. After I installed Npgsql.EntityFrameworkCore.PostgreSQL OrmLite throws this error:

System.TypeLoadException: Could not load type 'NpgsqlTypes.NpgsqlDate' from assembly 'Npgsql, Version=7.0.2.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7'.
   at ServiceStack.OrmLite.PostgreSQL.PostgreSqlDialectProvider..ctor()
   at ServiceStack.OrmLite.PostgreSQL.PostgreSqlDialectProvider..cctor() in /home/runner/work/ServiceStack/ServiceStack/ServiceStack.OrmLite/src/ServiceStack.OrmLite.PostgreSQL/PostgreSQLDialectProvider.cs:line 25

What is best way to handle this?

Npgsql v7 isn’t supported yet, it’s on our TODO list for after today’s release.

1 Like

@DigitalReach Npgsql 7.0.2 support has been added and is available on latest MyGet version. Give it a try and let us know if you hit any issues using the latest version.