asp.net core 5.0的一些模块

本文介绍ASP.NET Core从3.1升级到5.0的过程及新增特性,包括ORM Dapper、Prometheus监控、NLog日志记录、Swagger API文档、JWT认证授权、健康检查模块及本地化支持。

.net 5就要发布了,把asp.net core 3.1的一些模块改成了5.0来适配,基本都是体力活,没有太大改动。

  • ORM

dapper一个轻量级的ORM,重点实现SQL语句实体映射,用sql不失灵活高效,映射用实体不失简便快捷,同时适配大部分数据库。https://github.com/axzxs2001/aspnetcore5.0/tree/master/aspnetcore5.0/Dapper

  • 监控

prometheus通用监控组件,kubernetes之友https://github.com/axzxs2001/aspnetcore5.0/tree/master/aspnetcore5.0/Prometheus

  • 日志

nlog简单方便的log框架,配置功能强大,无缝对接asp.net core,https://github.com/axzxs2001/aspnetcore5.0/tree/master/aspnetcore5.0/LogDemo/LogDemo01_NLog

  • API文档查看
    swagger被asp.net core官方web api模板内置,可见其易用,广泛。https://github.com/axzxs2001/aspnetcore5.0/tree/master/aspnetcore5.0/API/APIDemo02

  • 认证授权

官方模块,利用JWT验证,进行了简单的封装,https://github.com/axzxs2001/aspnetcore5.0/tree/master/aspnetcore5.0/AuthenticationAndAuthorization

  • 健康检查

官方模块,实现了调用,是应用健康的必备

https://github.com/axzxs2001/aspnetcore5.0/tree/master/aspnetcore5.0/HealthChecks

  • 本地化

做多语言的必看,官方模块,注意SharedResource.cs的位置

https://github.com/axzxs2001/aspnetcore5.0/tree/master/aspnetcore5.0/GlobalizationAndLocalization/GlobalizationLocalizationDemo01

.net5发布后,会切换成正式的包,同时也会增加我工作中用到的一些模块,我的GitHub:https://github.com/axzxs2001/aspnetcore5.0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值