不支持.NETCore2.2中的AlwaysEncrypted”
创始人
2025-01-11 18:30:06
0

在.NET Core 2.2中,不支持Always Encrypted。如果需要使用Always Encrypted功能,可以考虑将应用程序升级到.NET Core 3.0或更高版本。

示例代码:

using System;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;

namespace AlwaysEncryptedDemo
{
    class Program
    {
        static void Main(string[] args)
        {
            string connectionString = "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=MyDatabase;Integrated Security=True;Column Encryption Setting=Enabled;";

            using (SqlConnection connection = new SqlConnection(connectionString))
            {
                connection.Open();

                using (SqlCommand command = new SqlCommand("SELECT * FROM Customers", connection))
                {
                    using (SqlDataReader reader = command.ExecuteReader())
                    {
                        while (reader.Read())
                        {
                            string customerId = reader["CustomerId"].ToString();
                            string firstName = reader["FirstName"].ToString();
                            string lastName = reader["LastName"].ToString();

                            Console.WriteLine($"CustomerId: {customerId}, FirstName: {firstName}, LastName: {lastName}");
                        }
                    }
                }
            }
        }
    }
}

相关内容

热门资讯

透视实锤!wpk有没有脚本,w... wpk有没有脚本赢率提升策略‌;透视实锤!wpk有没有脚本,wepoker怎么看牌型,解密教程(原先...
透视计算!wepoker辅助器... 透视计算!wepoker辅助器下载,智星菠萝可以辅助吗,新2025教程(固有是真的有挂) 科技详细教...
透视安卓版!wpk辅助器,we... 透视安卓版!wpk辅助器,wepoker有透视吗,必胜教程(原生有挂);值得一提的是,wpk辅助器计...
透视软件!wepoker透视脚... 透视软件!wepoker透视脚本免费,sohoo poker辅助,总结教程(都是真的是有挂);wep...
透视线上!wepoker脚本下... 透视线上!wepoker脚本下载,hhpoker德州挂真的有吗,透明挂教程(素来真的是有挂);原来确...
透视计算!aapoker透视软... 透视计算!aapoker透视软件,德州机器人代打脚本,技巧教程(起初真的是有挂);超受欢迎的aapo...
透视攻略!hhpoker透视脚... 透视攻略!hhpoker透视脚本安卓,wepoker软件靠谱么,解密教程(固有真的是有挂)1、这是跨...
透视app!wepoker透视... 透视app!wepoker透视脚本,wpk插件辅助,第三方教程(从来真的是有挂);1.wepoker...
透视好友房!wpk辅助购买,w... 透视好友房!wpk辅助购买,wepoker软件靠谱么,曝光教程(原本是有挂);wpk透视辅助官方版是...
透视脚本!wepoker底牌透... 透视脚本!wepoker底牌透视脚本app,pokerworld破解版下载,揭秘攻略(都是存在有挂)...