上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 44 下一页
摘要: 1. 安装两个nuget包: 2. 创建log4net.config 配置文件,并选中log4net文件点击鼠标右键选择属性将"复制到输出目录"改为"始终复制" <?xml version="1.0" encoding="utf-8"?> <log4net> <!-- Define some out 阅读全文
posted @ 2024-06-03 16:17 龙卷风吹毁停车场 阅读(105) 评论(0) 推荐(0)
摘要: 1. 再Program.cs 文件中添加 builder.Services.AddSwaggerGen(options => { //读取根据api生成的控制器xml文件 var file = Path.Combine(AppContext.BaseDirectory, "WebApplicatio 阅读全文
posted @ 2024-06-02 19:41 龙卷风吹毁停车场 阅读(84) 评论(0) 推荐(0)
摘要: 1. 创建一个Config文件夹,再文件夹下创建一个类,我这点取名 DefaultValue.cs using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; using Swashbuckle.AspNetCore.SwaggerGen 阅读全文
posted @ 2024-05-31 22:47 龙卷风吹毁停车场 阅读(781) 评论(0) 推荐(0)
摘要: 设置统一时间返回格式跳转到这片文章: https://www.cnblogs.com/tlfe/p/18225339 阅读全文
posted @ 2024-05-31 22:10 龙卷风吹毁停车场 阅读(27) 评论(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 龙卷风吹毁停车场 阅读(166) 评论(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 龙卷风吹毁停车场 阅读(410) 评论(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 龙卷风吹毁停车场 阅读(58) 评论(0) 推荐(0)
摘要: 使用 : 注意: 用guid做主键时,不能把主键设置为聚集索引,因为聚集索引是按照顺序保存主键的,因此用guid作为主键性能差 Guid g = Guid.NewGuid(); Console.WritLine(g.ToString()); 阅读全文
posted @ 2024-05-30 13:23 龙卷风吹毁停车场 阅读(43) 评论(0) 推荐(0)
摘要: 安装两个NuGet: Microsoft.EntityFrameworkCore.SqlServer Microsoft.EntityFrameworkCore.Tools 1.创建一个Book.cs文件 using System; using System.Collections.Generic; 阅读全文
posted @ 2024-05-30 10:57 龙卷风吹毁停车场 阅读(135) 评论(0) 推荐(0)
摘要: using System; namespace ConsoleApp1 { public class Program { /* 静态方法 (static): 特点: 1.生命周期,一旦创建--应用结束才会销毁 2.可全局使用 3.效率高 用处: 用户登陆信息,系统配置信息,系统设置,SqlHelpe 阅读全文
posted @ 2024-05-25 11:41 龙卷风吹毁停车场 阅读(78) 评论(0) 推荐(0)
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 44 下一页