11 2022 档案
摘要:NETCORE 使用中间件获取请求头 创建项目:框架 net6 web api: 项目名称:NETCORE.RequestHead 1. 创建中间件 RequestHeaderVerificationMiddleware.cs using Microsoft.Extensions.Primitive
阅读全文
摘要:NETCORE - AutoMappper 对象映射 创建项目 .net6 web api :NETCORE.TAutoMappper 引用 nuget 包 : AutoMapper.Extensions.Microsoft.DependencyInjection 创建两个类: model 与 dt
阅读全文
摘要:NETCORE - ValidationAttribute 属性验证 创建 .net6 web api 项目:NETCORE.TAttribute.Valide 创建 model 类 using System.ComponentModel.DataAnnotations; namespace NET
阅读全文