极速效率
这个版本最大的亮点就是新增了 WebAPI 自动生成 Vue2+,React,Angular 三大框架的 Ajax 请求代码,以后再也不用自己手写 Ajax ,开发效率至少提高 50%+,给前端程序员减负。
另外添加了 JSON Schema 支持,在任何主流的 IDE 中都支持配置智能补全和验证。
![]()
![]()
![]()
![]()
本期更新
-
新特性
- [新增] 跨域
WithExposedHeaders 默认配置 access-token 和 x-access-token 42ebdfd
- [新增] 脚手架默认启用
app.UseHttpLogging() HTTP 日志 42ebdfd
- [新增]
Furion 和 ASP.NET Core 完整 json 配置的 JSON Schema 架构 JSON Schema
- [新增]
Sql 代理支持返回单个类类型参数 1d7fb5b
- [新增]
Sql 代理支持返回 ValueTuple 单个类类型参数 876a2f5
-
突破性变化
- [新增]
Furion 和 ASP.NET Core 完整 json 配置的 JSON Schema 架构 JSON Schema
-
问题修复
- [修复] 自
v3.6.3 版本依赖,执行原生 Sql 添加了参数校验导致存储过程执行错误问题 #I5ERMQ
-
其他更改
- [调整] 脚手架所有
.json 文件,默认添加 JSON Schema 支持
-
文档
- [新增]
Vue/React/Angular 请求代理文档
- [新增]
JSON Schema 文档,支持配置智能提示和验证
- [更新] 跨域文档、规范化文档、配置文档、日志文档
本期亮点
- 新增
JSON Schema 支持,所有 .json 文件支持智能提示和验证
{
"$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"Microsoft.EntityFrameworkCore": "Information",
"Microsoft.AspNetCore.HttpLogging.HttpLoggingMiddleware": "Information"
}
},
"AllowedHosts": "*"
}
![]()
- 根据
Swagger 生成 Vue/React/Angular 前端请求代码
![]()
![]()
Sql 代理支持返回单个类类型参数
public interface ISql : ISqlDispatchProxy
{
// 集合类型
[SqlExecute("select * from person")]
List<Person> GetPersons();
// 自 v3.7.2+ 版本支持返回单个类类型参数
[SqlExecute("select * from person where id=@id")]
Person GetPerson(int id);
}
public interface ISql : ISqlDispatchProxy
{
[SqlExecute(@"
select * from person where id =@id;
select * from person")]
(Person, List<Person>) GetData(int id); // 注意返回值是 `(Person, List<Person>)` 组合
}