efcore.pg icon indicating copy to clipboard operation
efcore.pg copied to clipboard

Precompiled query/NativeAOT work

Open roji opened this issue 1 year ago • 4 comments

Implement test suites: AdHocPrecompiledQueryRelationalTestBase, PrecompiledQueryRelationalTestBase, PrecompiledSqlPregenerationQueryRelationalTestBase.

roji avatar Sep 01 '24 18:09 roji

I have something for this. Most just works straight out the box.

Have a couple that don't work though

The type 'NpgsqlTsQuery' is defined in an assembly that is not referenced. You must add a reference to assembly 'Npgsql, Version=8.0.3.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7'

How do you add a reference to an assembly with precompile queries?

ChrisJollyAU avatar Sep 07 '24 18:09 ChrisJollyAU

Initial test work done by @ChrisJollyAU in #3289 (thanks!). We still need to ensure quoting is supported (and tested) by all Npgsql-specific expression types.

roji avatar Sep 23 '24 07:09 roji

@roji can you let us know what's the status of AOT support for this library? Is it compatible to what has been described here https://learn.microsoft.com/en-us/ef/core/performance/nativeaot-and-precompiled-queries

GunboatDiplomat avatar Apr 27 '25 14:04 GunboatDiplomat

@GunboatDiplomat more or less yes.

roji avatar Apr 28 '25 06:04 roji