That second line is a bit long, so it would be nice to pull it out as a reusable extension method: Unfortunately this forces Entity Framework to run the query in memory, rather than in the database.
This is a foreign data wrapper (FDW) to connect PostgreSQL to SQLite database file. This FDW works with PostgreSQL 13, 14, 15, 16, 17 and confirmed with SQLite 3.49.0 ...