-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.NET 7, nothing happens #24
Comments
anyone? i really want to use this package. |
Had the same problem when i tried to save my model to the database. First thing i had to change is the Second thing is that i had to downgrade my entityframeworkcore nuget package version to 6.0.0 (Also for the .Design, .Tools and .SqlServer). Third. i see you use a partial modelcreating Lastly. Saving data directly to the database with an insert does not encrypt / decrypt the data with the Try this for example:
You only have the change the If you still have issue's, let me know ;) |
I ended up using EntityFrameworkCore.JamieEncryptColumn from nuget. |
Yeah, it is the same project, but with the use of newer packages versions for EntityFrameworkCore 8.0.0 and above. So i will use this instead. Thanks for the tip :D |
Hi,
i am using .NET 7 and i did exactly what you described in documentation but nothing happens, my data is still saved in clear text.
Am i missing something?
here is my dbcontext:
private readonly IEncryptionProvider _provider;
public AppDbContext()
{
_provider = new GenerateEncryptionProvider("example_encrypt_key");
}
.....
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.UseEncryption(_provider);
modelBuilder.ApplyConfigurationsFromAssembly(typeof(AppDbContext).Assembly);
and my entity model:
[EncryptColumn]
public string UserName { get; set; }
The text was updated successfully, but these errors were encountered: