上一页 1 2 3 4 5 6 ··· 18 下一页
摘要: AutoMapper的集合转换用起来有点别扭,原因如下图 简单封装一下,使使用体验一致:(相同属性才拷贝) public class Mapper { /// <summary> /// 对象拷贝(属性相同的字段拷贝,支持不同对象类型) /// </summary> /// <typeparam n 阅读全文
posted @ 2023-05-25 15:57 Ace001 阅读(67) 评论(0) 推荐(0) 编辑
摘要: services.AddDbContextPool<DbContext1>(optionsBuilder => optionsBuilder.UseDm(Configuration.GetConnectionString("DB")),500 ); 转自:https://www.cnblogs.co 阅读全文
posted @ 2023-05-15 11:06 Ace001 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 命令行模板 dotnet publish -r <运行时> -c Release -f <框架版本,单框架时可不指定> --self-contained -p:PublishSingleFile=<单文件 true/false> -p:PublishTrimmed=<裁剪 true/false> ( 阅读全文
posted @ 2023-05-11 09:45 Ace001 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 1.nuget安装对应包 2.winform里使用 2.1配置连接字符串 <appSettings><add key="db" value="Server=ip:5236;Database=Db1;User Id=root;Password=xxx" /></appSettings> 2.2使用 s 阅读全文
posted @ 2022-10-06 19:47 Ace001 阅读(740) 评论(0) 推荐(0) 编辑
摘要: services.Configure<Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions>(options => {//414 uri too long options.Limits.MaxRequestLineSize = i 阅读全文
posted @ 2022-01-17 14:06 Ace001 阅读(563) 评论(1) 推荐(1) 编辑
摘要: 查看输出窗口提示: 正在从 origin 提取正在推送 masterWarning: Pulling without specifying how to reconcile divergent branches isdiscouraged. You can squelch this message 阅读全文
posted @ 2022-01-10 10:58 Ace001 阅读(4740) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/liwan09/article/details/89597848 问题描述:.Net Core 项目发布后,在form 表单提交保存数据时,提示 请求的长度超过最大限制 代码修改 Starpup.cs中 //配置文件大小限制 services.Config 阅读全文
posted @ 2021-12-29 13:35 Ace001 阅读(1546) 评论(0) 推荐(0) 编辑
摘要: 解决办法: 尝试删除聚集索引报错: “不能修改或删除聚集索引的列”或“试图删除聚集主键” 即使使用sysdba用户也不行. 后经搜索得一法: https://blog.csdn.net/wuzhouchuang/article/details/108600786 -- 关闭默认主键指定CLUSTER 阅读全文
posted @ 2021-12-29 09:30 Ace001 阅读(1979) 评论(0) 推荐(0) 编辑
摘要: efcore默认执行sql语句需要 dbContext.Set<T>().FromSqlRaw(sql, parameters); 必须定义具体的泛型参数T的实体类,然后在dbContext中包含 public virtual DbSet<User> User { get; set; }, 如下函数 阅读全文
posted @ 2021-12-20 14:13 Ace001 阅读(1894) 评论(3) 推荐(0) 编辑
摘要: USE [数据库名称] GO ALTER DATABASE 数据库名称 SET RECOVERY SIMPLE WITH NO_WAIT GO DBCC SHRINKFILE (N'数据库名称_log' , 400, TRUNCATEONLY) GO DBCC SHRINKDATABASE(N'数据 阅读全文
posted @ 2021-10-27 16:40 Ace001 阅读(371) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 18 下一页