摘要: 转自:https://docs.microsoft.com/zh-cn/aspnet/core/fundamentals/servers/kestrel?view=aspnetcore-2.2 Kestrel 是一个跨平台的适用于 ASP.NET Core 的 Web 服务器。 Kestrel 是 阅读全文
posted @ 2020-07-19 07:21 PrintY 阅读(661) 评论(1) 推荐(0)
摘要: 转自:https://www.cnblogs.com/fancyblogs/p/10535214.html EF Core 没有直接提供像 EF6 那样方便的在日志中记录最终生成的 SQL 的功能,可以通过官方提供的日志记录(Microsoft.Extensions.Logging)实现. 一. 使 阅读全文
posted @ 2020-07-12 21:25 PrintY 阅读(841) 评论(0) 推荐(0)
摘要: 引用:microsoft.extensions.configuration microsoft.extensions.configuration.json 1 public iactionresult index() 2 { 3 var builder = new configurationbuil 阅读全文
posted @ 2020-07-12 20:48 PrintY 阅读(393) 评论(0) 推荐(0)
摘要: 第一种直接放到通用类库,那里想调往那调。 1.编辑我们的appsettings.json文件 { "Logging": { "LogLevel": { "Default": "Information", "Microsoft": "Warning", "Microsoft.Hosting.Lifet 阅读全文
posted @ 2020-07-12 19:10 PrintY 阅读(649) 评论(0) 推荐(0)
摘要: 通过 Nuget 安装 :Microsoft.EntityFrameworkCore.Tools 选择对应的类库层,Nuget控制台,键入: Scaffold-DbContext 'Data Source=.;Initial Catalog=DBTEST;integrated security=tr 阅读全文
posted @ 2020-07-07 22:23 PrintY 阅读(367) 评论(0) 推荐(0)
摘要: c# 模拟表单提交,post form 上传文件、数据内容 阅读全文
posted @ 2019-12-16 19:13 PrintY 阅读(1367) 评论(0) 推荐(0)
摘要: 转自 https://www.cnblogs.com/Leo_wl/p/3866625.html,再次感谢 指定的目录或文件在 Web 服务器上不存在。 URL 拼写错误。 某个自定义筛选器或模块(如 URLScan)限制了对该文件的访问。 解决方法: 返回的错误表明IIS缺少针对无后缀的MVC请求 阅读全文
posted @ 2019-11-25 14:22 PrintY 阅读(1008) 评论(0) 推荐(0)
摘要: using Excel = Microsoft.Office.Interop.Excel; Excel.Application excelapp = new Excel.Application(); Excel.Workbook wb = excelapp.Workbooks.Open(excelP 阅读全文
posted @ 2019-11-20 10:58 PrintY 阅读(889) 评论(0) 推荐(0)
摘要: 1 string filePath = @"C:\Users\yangqinglin\Desktop\test.xlsx"; 2 IWorkbook wk = null; 3 string extension = System.IO.Path.GetExtension(filePath); 4 FileStream fs = File.OpenRead(filePath); 5 if (exten 阅读全文
posted @ 2019-11-20 10:41 PrintY 阅读(1765) 评论(0) 推荐(0)
摘要: 1 IWorkbook workbook = new XSSFWorkbook(); 2 ISheet sheet = workbook.CreateSheet("-"); 3 IRow row = sheet.CreateRow(0);//标题 4 5 IRow titleRow = row.CreateCell(0); 6 Row.SetCellValue("标题列1"); 7 8 IRow 阅读全文
posted @ 2019-11-20 09:33 PrintY 阅读(1318) 评论(0) 推荐(0)