上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 44 下一页
摘要: using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using System.IO; using System.IO.Compression; namespace WebApplication1.Controllers { 阅读全文
posted @ 2024-06-04 21:13 龙卷风吹毁停车场 阅读(18) 评论(0) 推荐(0)
摘要: 你可以使用C#的RNGCryptoServiceProvider类来生成随机的字节数组,然后将其转换为Base64编码的字符串作为JWT的秘钥。 using System; using System.Security.Cryptography; namespace YourNamespace { p 阅读全文
posted @ 2024-06-04 15:32 龙卷风吹毁停车场 阅读(196) 评论(0) 推荐(0)
摘要: 1. 安装三个nuget包 2. 创建 log4net.config 文件 ,选中 文件鼠标右键,选择属性->复制到输出目录 修改为 始终复制 <?xml version="1.0" encoding="utf-8" ?> <log4net> <!-- Debug日志 --> <appender n 阅读全文
posted @ 2024-06-03 17:17 龙卷风吹毁停车场 阅读(214) 评论(0) 推荐(0)
摘要: 1. 安装两个nuget包: 2. 创建log4net.config 配置文件,并选中log4net文件点击鼠标右键选择属性将"复制到输出目录"改为"始终复制" <?xml version="1.0" encoding="utf-8"?> <log4net> <!-- Define some out 阅读全文
posted @ 2024-06-03 16:17 龙卷风吹毁停车场 阅读(82) 评论(0) 推荐(0)
摘要: 1. 再Program.cs 文件中添加 builder.Services.AddSwaggerGen(options => { //读取根据api生成的控制器xml文件 var file = Path.Combine(AppContext.BaseDirectory, "WebApplicatio 阅读全文
posted @ 2024-06-02 19:41 龙卷风吹毁停车场 阅读(58) 评论(0) 推荐(0)
摘要: 1. 创建一个Config文件夹,再文件夹下创建一个类,我这点取名 DefaultValue.cs using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; using Swashbuckle.AspNetCore.SwaggerGen 阅读全文
posted @ 2024-05-31 22:47 龙卷风吹毁停车场 阅读(650) 评论(0) 推荐(0)
摘要: 设置统一时间返回格式跳转到这片文章: https://www.cnblogs.com/tlfe/p/18225339 阅读全文
posted @ 2024-05-31 22:10 龙卷风吹毁停车场 阅读(17) 评论(0) 推荐(0)
摘要: 安装 nuget:Microsoft.AspNetCore.Mvc.NewtonsoftJsonModel文件下创建的基类: namespace WebApiTest1.Model { public class Class { public long Id { get; set; } public 阅读全文
posted @ 2024-05-31 22:00 龙卷风吹毁停车场 阅读(132) 评论(0) 推荐(0)
摘要: 官网: https://www.donet5.com/home/docunget安装包: SqlSugarCore 1.整体目录结构 2. DbContext.cs文件内容 using SqlSugar; using System.Diagnostics; using System.Reflecti 阅读全文
posted @ 2024-05-31 11:28 龙卷风吹毁停车场 阅读(372) 评论(0) 推荐(0)
摘要: 1. Update-Database xxxx 把数据库回滚到xxx的状态,迁移脚本不动. 2. Remove-m igration 删除最后一次的迁移脚本 3. Script-Migration 生成迁移SQL代码,有了Update-Database 为什么还要生成SQL, 可以生成版本D到版本F 阅读全文
posted @ 2024-05-30 14:14 龙卷风吹毁停车场 阅读(47) 评论(0) 推荐(0)
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 44 下一页