Context
EF Core 6 with some columns in the database encrypted with Always Encrypted
Issue
Those encrypted columns cannot be queried. In some cases, EF will throw exceptions; others are not. But in principal, we do not want to do the query on these encrypted columns as the result is not correct. But, sometimes the developers do it by mistake since they forget about these encrypted fields...
Wish
Inspect the query (before EF sends it to database server), and throw exception if any of the encrypted columns presents in the query. Is there any way to achieve this?