I am currently in the process of upgrading my API from .NET 6 to .NET 8. As part of this project, we are using the AltairCA.EntityFrameworkCore.PostgreSQL.ColumnEncryption library (Version 6.0.2.3). During this upgrade process, I have updated all NuGet packages to their respective latest stable versions and upgraded all projects to target .NET 8.
While trying to run the application, I encounter an error from the OnModelCreating() method when UseEncryptAttribute() method from your library is invoked.
Here is the relevant code snippet:
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
var password = // Code to get encryption password
modelBuilder.HasPostgresExtension("pgcrypto");
modelBuilder.UseEncryptAttribute(password, EncKeyLength.L128);
}
The error message I receive is as follows:
Method not found: 'System.Collections.Generic.IEnumerable`1<Microsoft.EntityFrameworkCore.Metadata.IMutableProperty> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType.GetProperties()'.
The error indicates that during the call to UseEncryptAttribute, there is an attempt to use a method called GetProperties() on IMutableEntityType from EF Core which cannot be found.
Any guidance or suggestions regarding this issue would be greatly appreciated. Thank you for your time and help.
I am currently in the process of upgrading my API from .NET 6 to .NET 8. As part of this project, we are using the
AltairCA.EntityFrameworkCore.PostgreSQL.ColumnEncryption library (Version 6.0.2.3)
. During this upgrade process, I have updated all NuGet packages to their respective latest stable versions and upgraded all projects to target .NET 8. While trying to run the application, I encounter an error from theOnModelCreating()
method whenUseEncryptAttribute()
method from your library is invoked.Here is the relevant code snippet:
The error message I receive is as follows:
And here is the related stack trace:
The error indicates that during the call to
UseEncryptAttribute
, there is an attempt to use a method calledGetProperties()
onIMutableEntityType
from EF Core which cannot be found. Any guidance or suggestions regarding this issue would be greatly appreciated. Thank you for your time and help.