C
C#4w ago
minh101

EFCore SQL translate

How to i customize the SQL translate from EF core when add an entity that generate to similry raw SQL like this:
INSERT INTO "users" ("name", "email")
VALUES (
pgp_sym_encrypt('john', '123'),
pgp_sym_encrypt('[email protected]', '123'),
'abc'
)
INSERT INTO "users" ("name", "email")
VALUES (
pgp_sym_encrypt('john', '123'),
pgp_sym_encrypt('[email protected]', '123'),
'abc'
)
2 Replies
Angius
Angius4w ago
GitHub
Use PGP_SYM_ENCRYPT with EF Core (Using DbCommandInterceptor) · Iss...
I want to use PGP_SYM_ENCRYPT and PGP_SYM_DECRYPT functionality with Npgsql.EntityFrameworkCore.PostgreSQL library. I've created a custom DbCommandInterceptor to modify SQL queries on the fly. ...
minh101
minh101OP4w ago
I already found it but seemly it just have encrypt_iv and decrypt_iv.

Did you find this page helpful?