WebRequest方式 封装的方法 using Newtonsoft.Json; using System; using System.Collections.Generic; using System.IO; using System.Net; using System.Text; namesp Read More
方式一:自定义1 方法类: using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Linq Read More
命名空间 System.ComponentModel.DataAnnotations 全局模型验证,统一api响应 1、WebApi项目下新建文件夹【Custom】,新建文件夹【Filter】定义类FieldActionFilter using Microsoft.AspNetCore.Mvc; u Read More
Swagger基础配置 1、非生产环境,不开启Swagger,根据实际需要决定 2、设置项目属性 xml文件地址:当前地址【Test.WebApi.xml】,其他项目地址【..\Test.WebApi\Test.WebApi.xml】 3、修改服务注册、注意修改xml文件名称 public Star Read More