01 2020 档案
摘要:先来个简单的 2、运行没毛病 3、查看TCP发现 TIME_WAIT 4 、 运行多次有多个 5、主角登场 在.Net Core2.1后,微软引入了HttpClientFactory彻底解决这个问题,工厂模式的职责是负责创建对象,这个类主要负责创建HttpClient实例 首先在StartUp中注册
阅读全文
摘要:1、接口定义 2、实现 3、测试IEnumerable 4、测试IQueryable
阅读全文
摘要:1 、安装Microsoft.AspNetCore.Authentication.JwtBearer 2、Startup添加服务 3、 增加TOKEN控制器 4、保护API
阅读全文
摘要:SELECT TOP (100) PERCENT t.id, t.samplecode, t.path, t.step, t.plan_start, t.plan_finish, t.actual_start, t.actual_finish, w.name AS workstationname,
阅读全文
摘要:1、 install Microsoft.AspNetCore.Authentication.Cookies; 2、添加服务 3、过滤器
阅读全文
摘要:1、接口 using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Threading.Tasks; namespace WebAppl
阅读全文
摘要:1、自定义中间件 using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Configuration; using System; using System.Collections.Generic; using System.IO; u
阅读全文
摘要:1 nuget安装AutoMapper、AutoMapper.Extensions.Microsoft.DependencyInjection 2、添加dto 3、 配置 DTO 和实体映射类 4、注入服务 6、 使用
阅读全文
摘要:1、 新建实体 2、新建中间实体 3、添加导航属性 4、Fluent API 配置关系 5、 add-migraion 6 、 update-database
阅读全文
摘要:1、 新建实体 2、添加导航属性 3 、申明集合 4、add-migraion "add course"5、update-database
阅读全文
摘要:1、新建实体 二、Student 添加导航属性 3、 申明集合 4、 add-migration "add profile" 5 、update-database
阅读全文
摘要:1、建立实体 二、DBcontext 3、 startup 添加服务 4、配置appsetting.json 5、数据迁移 生成migrations文件夹后执行update-database 6、回退 update-database "init" 则回退到"init "这个版本
阅读全文