Closed malixg closed 2 years ago
@malixg You are doing something wrong. But I cannot tell what without a repro project.
It should be:
[DbConfigurationType(typeof(MicrosoftSqlDbConfiguration))]
I too am having issues getting this to work. I've stripped my solution down to next to nothing to rule out as much as possible. It's a .NET 6 WPF app, without an app.xaml, and neither the DbConfigurationType attribute nor DbConfiguration.SetConfiguration method is working. Though, I am not seeing System.Data.SqlClient like @malixg is seeing.
I'll try to strip down the project as much as possible in the next day or two and try to get it to you for debugging. Thanks for everything.
@MikeFarrington looking forward to your repro
@MikeFarrington And please create a new issue with your repro
Well, don't I feel dumb...
After many hours struggling with everything, it wasn't until looking at the available properties in SqlConnectionStringBuilder and seeing ColumnEncryptionSetting did I realize that I now need to add "Column Encryption Setting=true" to my connection string, whereas it was all very transparent and automatic previously.
Welp, there's a weekend I won't get back. Once again though, thank you for all of your efforts.
I have an application that uses EF with SQLEXPRESS2019 and always encrypt. I'm trying to migrate from .net framework 4.8 to .net 6. I'm well into the process and getting stuck at the error "Keyword not supported: 'column encryption setting'". My searches brought me here. I've installed the nuget package. I've added the DbConfigurationTypeAttribute(typeof(MicrosoftSqlDbConnection) as well as calling DbConfiguration.SetConfiguration(new MicrosoftSqlDbConnection()); I've replaced all the using with the Microsoft.* versions. I am still getting the same error about the column encryption. When I inspect the created dbContext.Database, it is still using the System.Data.SqlClient. Any advice? Thanks