emrekizildas / EntityFrameworkCore.EncryptColumn

Encrypt & Decrypt your databases columns using EntityFramework Core.
MIT License
87 stars 40 forks source link

Error: You should create encryption provider. (Parameter 'encryptionProvider') #11

Closed leijae closed 2 years ago

leijae commented 2 years ago

I'm on MVC .Net Core 3.1 & EFCore using EntityFrameworkCore.EncryptColumn Version 3.1.0

I'm getting the following error when I create a migration on an existing table in my database. Error: You should create encryption provider. (Parameter 'encryptionProvider')

Currently my DbContext looks thusly (the key is just a random GUID I generated for testing purposes): image

image

I have DTO with the property SSN image

The project builds, but again the error happens I create the migration. As far as I understand, isn't the provider being created when the Context is newed-up, or on application start?

leijae commented 2 years ago

Ended up just doing an AES encryption on the string, storing in the DB, then decrypting it when I need it....