efcore icon indicating copy to clipboard operation
efcore copied to clipboard

Unable to find options to change ColumnEncryptionKeyCacheTtl

Open chintan3100 opened this issue 6 years ago • 4 comments

Unable to find options to change ColumnEncryptionKeyCacheTtl

https://docs.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlconnection.columnencryptionkeycachettl?redirectedfrom=MSDN&view=netframework-4.8&viewFallbackFrom=netcore-3.1#System_Data_SqlClient_SqlConnection_ColumnEncryptionKeyCacheTtl

Steps to reproduce

Further technical details

EF Core version: Database provider: (e.g. Microsoft.EntityFrameworkCore.SqlServer) Target framework: (e.g. .NET Core 3.0) Operating system: IDE: (e.g. Visual Studio 2019 16.3)

chintan3100 avatar May 05 '20 17:05 chintan3100

@chintan3100 I'm not very familiar with it, but that is a static property. That means you should be able to set it yourself on SqlConnection, and there's no real need or value in EF Core doing anything with it.

roji avatar May 05 '20 17:05 roji

Looks like not supported in net core. It's supported in .net framework :(

chintan3100 avatar May 06 '20 07:05 chintan3100

Microsoft.Data.SqlClient does have this property - consider switching from System.Data.SqlClient to that (see this blog post for more details).

Am going to close this issue as nothing seems to be needed from the EF Core side, but if you encounter further difficulties feel free to post back.

roji avatar May 06 '20 09:05 roji

Is there any way to change this setting in SQL Server Management Studio (SSMS) ? It has default timeout to 2 hours or we have to close and start SSMS again to clear cache.

type4ranjan avatar Jul 06 '23 19:07 type4ranjan