![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
.net Core
PasteSpider
只要是你的服务支持部署到容器上,那PasteSpider将是你良好的助手,安全,小巧,特别适用于开发阶段的项目部署,告别频繁的部署动作,支持GIT/SVN自动部署,也支持手动点击几下的主动部署!更多PasteSpider的详细见专栏!
展开
-
【PasteSpider】的集群组件【PasteCluster】(让你的项目快速支持集群模式)的思路及实现(含源码)
无需关注集群是如何选举的,引入PasteCluster可以让你现有项目快速支持集群模式,你只要专注于你的业务代码即可!源码量不大,你可以基于自己的实际需求二次开发!原创 2024-06-13 11:29:12 · 679 阅读 · 0 评论 -
PasteSpider之提问与回答(持续更新... .. .)
通过问答的形式带你了解PasteSpider的方方面面,持续更新!原创 2024-05-23 22:01:11 · 761 阅读 · 0 评论 -
ABP中的ConcurrencyStamp的自动化管理
ConcurrencyStamp的自动化提交!原创 2023-09-01 18:32:05 · 678 阅读 · 1 评论 -
.NETCORE中关于swagger的分组
接口过多,需要使用到Swagger的分组功能,基于过滤器权限的划分,可以更加快速的划分出swagger的分组,提高接口访问速度!又不改变接口地址!原创 2023-08-24 09:53:05 · 1119 阅读 · 0 评论 -
.netCore 图形验证码,非System.Drawing.Common
.netcore 验证码,非System.Drawing.common实现,占用资源小,SixLabors.ImageSharp的图形验证码案例!原创 2022-09-06 17:45:42 · 1672 阅读 · 3 评论 -
.netcore 处理xss攻击,做输入验证
开发中我们往往需要给用户输入做一些特殊的过滤,主要的是防止xss攻击,至于一般的,有MaxLengthAttribute PhoneAttribute RegularExpressionAttribute等。MaxLengthAttribute 类 (System.ComponentModel.DataAnnotations) | Microsoft Docs上面是校验是否通过,我们这次做一个替换的,主要目的是防止xss工具,原理是比如在用户的输入字段中包裹一些js或者引入外部js等然后浏览器访问了原创 2022-04-06 11:05:36 · 1111 阅读 · 1 评论 -
按照时间拆分概率
private Random random; //tack("day", DateTime.Now, 600,3); //600分给3个小时 //tack("day", DateTime.Now, 600,3); //600分给1天,也就是分给24小时 /// <summary> /// 把数据拆分到对应时间内 /// </summary> /// <param n...原创 2022-03-17 09:41:40 · 130 阅读 · 0 评论 -
ABP.vNext中的HostService使用DbContext
需要注入这么个东西private IServiceProvider _service; using (var scope=_service.CreateScope()) { using(var _dbContext = scope.ServiceProvider.GetRequiredService<XXXDbContext>()){ //其他代码,需要使用_dbContext的}原创 2021-11-30 10:49:05 · 647 阅读 · 0 评论 -
ABP vNext 4.3.3
Unable to create an object of type 'XXXDbContext'. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728Unable to create an object of type 'xxxDbContext'. For the different patterns supported at design t原创 2021-10-13 15:05:18 · 221 阅读 · 0 评论 -
.NetCore过滤器太多了,排重!
过滤器的注入有三个方式1.直接全局注入options.Filters.Add(typeof(AuthUserAttribute));2.在Class标注[TypeFilter(typeof(AuthUserAttribute),Arguments =new object[] {"class","bbb" })]3.在Method标注[TypeFilter(typeof(AuthUserAttribute),Arguments =new object[] {"method","bbb" }...原创 2021-10-11 10:14:25 · 283 阅读 · 0 评论 -
ABP .netCore 3.1 支持直接执行SQL语句 反射或者直接输出JSONString的格式
直接上代码using Abp.Dependency;using Abp.EntityFrameworkCore;using AutoCodePlan.EntityFrameworkCore;using Microsoft.EntityFrameworkCore;using System;using System.Collections.Generic;using System.Data;using System.Data.Common;using System.Reflection;原创 2020-07-28 15:23:14 · 1159 阅读 · 5 评论 -
.netCore ABP 只修改部分字段 只更新部分列
也可以弄一个通用的using Abp.Dependency;using Abp.EntityFrameworkCore;using AutoCodePlan.EntityFrameworkCore;using System.Collections.Generic;using System.Threading.Tasks;namespace AutoCodePlan.Sql{ /// <summary> /// 指定更新部分字段...原创 2020-07-28 15:20:51 · 2007 阅读 · 1 评论 -
.net Core分段上传文件,大文件上传(V2.1)
UploadController部分代码 [HttpPost] public async Task<IActionResult> UploadPart(IFormFile file,int start,string filetemp) { long size = file.Length; ...原创 2019-11-16 09:49:32 · 647 阅读 · 0 评论