摘要:
第一步:引入NPOI程序包 第二步:准备好要插入数据的word模板 第三步:读取数据写入word中,注意对象名和word中的名一致,而且word中的名不能重复,否则写入不上,代码不用考虑word排版样式的问题 1 using Microsoft.AspNetCore.Hosting; 2 using 阅读全文
摘要:
select c.name from sysconstraints a inner join syscolumns b on a.colid=b.colid inner join sysobjects c on a.constid=c.id where a.id=object_id('表名') an 阅读全文
摘要:
1 System.IO.StreamReader sr = new System.IO.StreamReader(aHtmlFilePath); 2 var htmlText = sr.ReadToEnd(); 3 if (htmlText.Contains("img")) 4 { 5 string 阅读全文
摘要:
总结了常用的也是比较复杂的EF操作,希望提供给大家参考,有不对的地方欢迎小伙伴们留言指出,谢谢大家! 1、实体模型和上下文 using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; usi 阅读全文
摘要:
1.在项目下新建一个Filters的文件夹,用于放网站所有的过滤器 2.新建一个过滤器类:CheckCustomerAttribute,继承ActionFilterAttribute,重写方法OnActionExecuting using System; using System.Collectio 阅读全文