摘要: 1、Npgsql对 .NET 类型(如 List、Dictionary<string,object> 等)与 PostgreSQL 的 json/jsonb 字段的自动映射和序列化/反序列化,解决linq 转化成sql 解法:NpgsqlConnection.GlobalTypeMapper.Ena 阅读全文
posted @ 2025-06-25 09:01 Cody& 阅读(50) 评论(0) 推荐(0)
摘要: 在DBContext类下,重写SaveChangesAsync方法,并插入修改实体逻辑,参考代码如下: public override Task<int> SaveChangesAsync(bool acceptAllChangesOnSuccess, CancellationToken cance 阅读全文
posted @ 2025-06-10 14:13 Cody& 阅读(20) 评论(0) 推荐(0)
摘要: claim type的规范差异: 1、.NET Core的默认Claim Type规范 .NET Core的System.Security.Claims命名空间继承自早期的WS-*协议(如SAML),使用URI格式的Claim Type(如http://schemas.xmlsoap.org/ws/ 阅读全文
posted @ 2025-04-10 14:34 Cody& 阅读(58) 评论(0) 推荐(0)
摘要: 1、搭建runner 镜像:gitlab/gitlab-runner:latest 2、注册runner,输入gitlab-runner register命令 root@runner-6f49c57c49-5889v:/# gitlab-runner register Runtime platfor 阅读全文
posted @ 2025-02-14 14:42 Cody& 阅读(65) 评论(0) 推荐(0)
摘要: 需求:Oracle迁移至Postgresql数据库,结构相对简单,没有view、function、procedure .etc 比较使用工具(开源): 1、pgloader 2、ora2pg 3、Dbeaver 首选方案是pgloader,但失败了,最终选择了ora2pg来迁移 以下是我的实践过程: 阅读全文
posted @ 2025-02-05 11:29 Cody& 阅读(906) 评论(0) 推荐(0)
摘要: 2024/11/14 求助,为什么“targetRoundId1”引发了类型“System.NullReferenceException”的异常 代码: Dictionary<string, Dictionary<string,string>> exchangeRateDict1 = new (); 阅读全文
posted @ 2024-11-14 14:12 Cody& 阅读(62) 评论(0) 推荐(0)
摘要: angular在单元测试时执行ng test --no-watch --code-coverage报异常如下: ERROR [karma-server]: UncaughtException: Error: spawn UNKNOWN at ChildProcess.spawn (node:inte 阅读全文
posted @ 2024-10-10 11:08 Cody& 阅读(265) 评论(0) 推荐(0)
摘要: 框架:.Net 6 、webapi package:GitLabApiClient 定义body参数DTO,不同event有不同的参数,具体可参考gitlab文档:https://docs.gitlab.com/ee/user/project/integrations/webhook_events. 阅读全文
posted @ 2024-03-12 15:07 Cody& 阅读(73) 评论(0) 推荐(0)
摘要: 项目以net8建立为例子(net6也通用),使用Autofac实现构造函数注入、属性注入两种。 Autofac (第三方) 1、引用以下package Autofac Autofac.Extensions.DependencyInjection Microsoft.Extensions.Depend 阅读全文
posted @ 2024-02-25 11:09 Cody& 阅读(1656) 评论(0) 推荐(0)
摘要: 错误信息:(java编译文件版本与运行环境版本不一致导致) Using the .NET Core version of the Scanner for MSBuild Post-processing started. Calling the SonarScanner CLI... Error: L 阅读全文
posted @ 2024-01-18 16:22 Cody& 阅读(359) 评论(0) 推荐(0)