linq2db: Could not load type 'Microsoft.EntityFrameworkCore.Query.Internal.ExpressionEqualityComparer' from assembly 'Microsoft.EntityFrameworkCore

FirstOrDefault throws linq2db.EntityFrameworkCore.dll: 'Could not load type ‘Microsoft.EntityFrameworkCore.Query.Internal.ExpressionEqualityComparer’ from assembly 'Microsoft.EntityFrameworkCore, Version=5.0.0.0,

Do I miss something?

            LinqToDBForEFTools.Initialize();
            using (var efContext = new AccountingContextEf())
            {
                efContext.Database.OpenConnection();
                efContext.Database.Migrate();
                efContext.Database.CloseConnection();

                efContext.Database.EnsureCreated();
                var linq2DbContext = efContext.CreateLinqToDbContext();
                var first = linq2DbContext.GetTable<User>().FirstOrDefault();
            }

Environment details

linq2db version: 3.1.6 Database Server: SQLite In Memory .NET Framework: 5.0.0

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

I will post a complete project this evening