随笔分类 - Asp.net Core
摘要:refer : https://docs.microsoft.com/en-us/dotnet/core/tutorials/library-with-visual-studio https://docs.microsoft.com/en-us/dotnet/core/tutorials/consu
阅读全文
摘要:请移步到: Date and Time 日期时间 – 开发中的基础知识 更新: 2022-09-27 Unix time 又叫 Unix timestamp 或 UNIX Epoch time 指的是从 1970 1月 1号 到指定时间的总秒数 (不是毫秒哦) C# 可以通过 DateTimeOff
阅读全文
摘要:EPPlus 已经支持 .net core 了 https://www.nuget.org/packages/EPPlus https://github.com/JanKallman/EPPlus refer: https://stackoverflow.com/questions/40209636
阅读全文
摘要:更新 : 2018-11-24 记入一些思考 asp.net core + identity 的权限是这样的 user = 1 个登入账号 role = 1 个角色 (类似于公司里的一个职位) claim = 令牌 (类似于古代,见令令牌如见皇帝或者将军) 一般上我们会把权限建立在 Page, 操作
阅读全文
摘要:更新 : id4 使用这个 DbContext 哦 dotnet ef migrations add identity-server-init --context PersistedGrantDbContext 参考 https://docs.microsoft.com/en-us/azure/ke
阅读全文
摘要:参考 : http://www.cnblogs.com/xishuai/p/aspnet-5-identity-part-one.html http://cnblogs.com/xishuai/p/aspnet-5-or-core1--identity-part-two.html https://c
阅读全文
摘要:更新: 30-04-2023 最新版本请看这篇: ASP.NET Core – User Secret & Azure Key Vault 最新 kv 多了一个功能叫 soft delete, 如果不小心洗掉后, 可以还原哦 az account set --subscription <subscr
阅读全文
摘要:和从前的 identity 区别不是很大. 从 2.1 开始 vs 模板的 identity 都被封装了起来, 你几乎看不到任何一行代码, 需要向下面这样打开它, 才能做修改. 说一下比较常用的配置 支持第三方登入 通过 onCreatingTicket 可以把资料放入特定的 claim 中, 比如
阅读全文
摘要:简单的为 url 添加 query 判断类 判断 1 个 class 准准是某个 class 判断 1 个 class 是不是某个 class 的 child ( must be child, parent must be class, interface can't ) 判断 1 个 class
阅读全文
摘要:2019-05-18 更新 : 目前遇到的问题 odata 团队非常的不给力,虽然我都用了好多年了,但是越用越少. 它的维护实在太差了。 很多好的功能都是因为 bug 而用不上. 1. https://github.com/OData/WebApi/issues/194 /api/orders?$f
阅读全文
摘要:更新:2021-06-11 c# 的 property 是 PascalCase 而 js 是 camelCase 所以在 form post 和 ajax 的时候经常会出问题. 以前我是让 c# 迁就 js 大家统一 camelCase 但是现在我觉得应该要让它们回归本质. 当然 asp.net
阅读全文
摘要:更新: 2021-06-17 5.0 之后多了一些不错的功能 https://docs.microsoft.com/en-us/ef/core/what-is-new/ef-core-5.0/whatsnew 1.Split queries _db.Subcategories.AsSplitQuer
阅读全文
摘要:参考 : http://cnblogs.com/nianming/p/7068253.html https://docs.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-2.1&tabs=windows 常常有
阅读全文
摘要:更新: 2022-04-01 翻新版本: ASP.NET Core – 操作 Uri 和 Query 更新 :2018-7-25 直接添加 query string. var resetPasswordLink = QueryHelpers.AddQueryString($"{Request.Sch
阅读全文
摘要:更新 : 2020-05-22 https://stackoverflow.com/questions/36866057/c-sharp-tool-that-formats-an-html-string-before-sending-it-to-the-client 手动调用 mini html 也
阅读全文
摘要:2022-05-20 更新 看这篇 ASP.NET Core – ViewComponent refer : https://docs.microsoft.com/en-us/aspnet/core/mvc/views/view-components core 和 Angular 的 compone
阅读全文
摘要:refer : https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7 out 可以写在里面了 Local functions, 终于有了, 写习惯 js 的我超爱 getter setter
阅读全文
摘要:更新: 2021-06-29 什么时候用 singleton, scope, transient https://stackoverflow.com/questions/38138100/addtransient-addscoped-and-addsingleton-services-differe
阅读全文
摘要:更新: 2023-04-08 请移步修订版 : ASP.NET Core – Upload and Download Files (上传和下载文件) 更新: 2021-06-14 改用 image sharp 来处理图片了. https://www.cnblogs.com/keatkeat/p/14
阅读全文
摘要:2018-09-18 core 2.1 之后有新的方案咯 http://www.talkingdotnet.com/3-ways-to-use-httpclientfactory-in-asp-net-core-2-1/ 就是解决之前单列等等的问题. 给个例子 定义一个 service startu
阅读全文