上一页 1 2 3 4 5 6 ··· 47 下一页
摘要: public static T JsonDeepTo<T>(this object obj) { switch (obj) { case null: return default; case JsonElement element: var jsonStr = element.GetRawText( 阅读全文
posted @ 2025-11-25 12:42 Hey,Coder! 阅读(7) 评论(0) 推荐(0)
摘要: 原理 应用程序调用 GetSchemaTable() ↓ ADO.NET 驱动程序生成元数据查询SQL ↓ 发送到数据库服务器执行 ↓ 数据库返回结果集架构信息(不包含实际数据) ↓ ADO.NET 解析架构信息并构建 DataTable ↓ 返回包含完整列信息的 DataTable sqlsuga 阅读全文
posted @ 2025-11-21 22:06 Hey,Coder! 阅读(10) 评论(0) 推荐(0)
摘要: public static class DistinctEx { /// <summary> /// 根据指定字段去重 /// </summary> /// <typeparam name="TSource"></typeparam> /// <typeparam name="TKey"></typ 阅读全文
posted @ 2025-11-04 14:27 Hey,Coder! 阅读(8) 评论(0) 推荐(0)
摘要: private SqlSugarClient GetDB() { SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { ConnectionString = "Host=127.0.0.1;Database=test;User 阅读全文
posted @ 2025-10-13 15:01 Hey,Coder! 阅读(55) 评论(0) 推荐(0)
摘要: 安装 docker run -dp 5000:5000 --restart=always --name oldboyedu-registry -v /var/lib/registry:/var/lib/registry registry:2 验证服务 curl http://127.0.0.1:50 阅读全文
posted @ 2025-10-09 11:44 Hey,Coder! 阅读(12) 评论(0) 推荐(0)
摘要: public static List<dynamic> OrderByKey (this IList<dynamic> list, string propertyName, bool isDescending = false) { var propertyInfo = list[0].GetType 阅读全文
posted @ 2025-09-25 13:27 Hey,Coder! 阅读(18) 评论(0) 推荐(0)
摘要: //测试类 var type = typeof(TestClass); //给类对象添加、获取特性 TypeDescriptor.AddAttributes(type, indexAttr); //var attr = TypeDescriptor.GetAttributes(type)[typeo 阅读全文
posted @ 2025-09-22 17:50 Hey,Coder! 阅读(27) 评论(0) 推荐(0)
摘要: public static class FileSafeWrite { public static void WriteAllTextAtomically(string filePath, string content) { // 定义临时文件路径 string tempFilePath = fil 阅读全文
posted @ 2025-09-22 15:05 Hey,Coder! 阅读(30) 评论(0) 推荐(1)
摘要: using System.Collections.Concurrent; internal class Program { static void Main(string[] args) { ConcurrentDictionary<string, RedisConnection> redisCon 阅读全文
posted @ 2025-09-16 18:59 Hey,Coder! 阅读(13) 评论(0) 推荐(0)
摘要: 通过pg_typeof //基础示例 SELECT pg_typeof(id) FROM t_basic_config LIMIT 1; //多表join SELECT pg_typeof(a.id),pg_typeof(b.user_password) FROM t_basic_config a 阅读全文
posted @ 2025-09-10 21:14 Hey,Coder! 阅读(17) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 47 下一页