04 2021 档案

摘要:一、ConfigureServices中注册服务 var corsArray = configuration["AllowedHosts:MyCors"].Split(','); services.AddCors(option => { option.AddPolicy(name: "MyCors" 阅读全文
posted @ 2021-04-27 16:44 苍煙落照 阅读(161) 评论(0) 推荐(0)
摘要:一、普通带参数存储过程 --创建存储过程 if (exists (select * from sys.objects where name = 'proc_getTotalRecords')) drop proc proc_getTotalRecords go create proc proc_ge 阅读全文
posted @ 2021-04-23 14:41 苍煙落照 阅读(804) 评论(0) 推荐(0)
摘要:一、方法封装 public static class DbContextExtension { public static List<T> GetList<T>(this DbContext db, string sql, CommandType type=CommandType.Text, par 阅读全文
posted @ 2021-04-20 09:26 苍煙落照 阅读(360) 评论(0) 推荐(0)