会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
研究、探索、分享与成长
.NET/.NET Core/WinForm/使用开源工具进行软件开发
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
下一页
2019年4月25日
ABP 使用 IShouldNormalize 完成缺省值初始化
摘要: 在 ABP 中有一个 IShouldNormalize 接口,内部只有一个方法 Normalize。主要场景用于 Dtonamespace Abp.Runtime.Validation{ // // ...
阅读全文
posted @ 2019-04-25 19:59 Jöhan
阅读(284)
评论(0)
推荐(0)
2019年4月22日
ABP 动态 WebApi 隐藏接口的方法(一)
摘要: 在ABP实际开发过程中既有可能会遇到不希望将某些方法暴露,那么就需要想办法将接口隐藏起来。方法一:通过修改修饰符实现。例如将方法修改为 private,这种方式比较常用。但这种方式就将方法的访问范围限制在当前类。...
阅读全文
posted @ 2019-04-22 19:42 Jöhan
阅读(882)
评论(0)
推荐(0)
2019年4月18日
Gitk 查看记录时中文乱码的其中一种设置方式
摘要: 在 Gitk 查看到的中文信息一般会出现乱码,这是因为 Git 的默认编码规则是 System(cp936)。知道这个信息后,我们就可以通过修改编码规则使中文可以正常显示,修改方式如下:1.通过命令打开 Gitk...
阅读全文
posted @ 2019-04-18 09:25 Jöhan
阅读(305)
评论(0)
推荐(0)
2019年4月15日
C# 将日期转换为时间戳(日期与时间戳互转)
摘要: public static class AbpExtensions{ /// /// 返回10位时间戳 Timestamp /// /// /// public sta...
阅读全文
posted @ 2019-04-15 14:56 Jöhan
阅读(2096)
评论(0)
推荐(0)
2019年4月8日
ABP 自定义会话过期时间(登录过期时间)
摘要: 找到一个继承 AbpModule 的类,在 PreInitialize() 方法中有一个 ConfigureTokenAuth() 方法,上图中最后一句 Expiration 就是过期时间了。注意这种方式是最便...
阅读全文
posted @ 2019-04-08 10:40 Jöhan
阅读(1147)
评论(0)
推荐(0)
2019年4月2日
Navicat 删除 PostgreSQL 数据库时提示正在被其他用户访问如何处理
摘要: ERROR: database 'xXx' is being accessed by other usersDETAIL: There are 5 other sessions using the databas...
阅读全文
posted @ 2019-04-02 09:52 Jöhan
阅读(1926)
评论(0)
推荐(0)
2019年3月25日
ABP 对 Microsoft.AspNetCore.Identity 规则的封装
摘要: 1.在 Core.Shared.PasswordComplexitySettingStore 中定义了密码规则的 Dto Security.PasswordComplexitySetting.cs 该 Dto 定...
阅读全文
posted @ 2019-03-25 14:31 Jöhan
阅读(243)
评论(0)
推荐(0)
2019年3月18日
C# new Guid()、Guid.Parse()、Guid.TryParse() 的简单性能对比
摘要: 三种方式分别执行一百万次转换用时:new Guid():258 msGuid.Parse():269 msGuid.TryParse():267 ms可以看出耗时差距微乎其微,并且以上代码在不同硬件环境下所耗时也...
阅读全文
posted @ 2019-03-18 14:59 Jöhan
阅读(616)
评论(0)
推荐(0)
2019年3月15日
C# 获取枚举集合的其中两种方式
摘要: 可能会在下面的场景中需要循环枚举值1、为方便前端展示,将返回的数据集合中的枚举名称显示出来。这样前端不需要做任何处理,直接展示即可。2、向前端输出枚举集合,用于数据筛选,并且前端不需要维护这些集合。后端有修改也不...
阅读全文
posted @ 2019-03-15 10:09 Jöhan
阅读(861)
评论(0)
推荐(0)
2019年3月13日
ABP AsyncHelper.RunSync 内部实现
摘要: using System;using System.Reflection;using System.Threading.Tasks;using Nito.AsyncEx;namespace Abp.Threadi...
阅读全文
posted @ 2019-03-13 10:02 Jöhan
阅读(631)
评论(0)
推荐(0)
2019年3月11日
ABP 扩展 OrganizationUnit 数据实体(新增字段)
摘要: OrganizationUnit 数据实体因为没有 abstract,相比 Role 加字段有点些不一样的地方,下面是实现步骤:1.新增 OrganizationUnitExtend 并继承 Abp.Organi...
阅读全文
posted @ 2019-03-11 10:59 Jöhan
阅读(774)
评论(0)
推荐(0)
2019年3月4日
ABP 调用 PUT 接口报错 405 Method Not Allowed
摘要: 返回结果为: HTTP 错误 405.0 - Method Not Allowed 无法显示您正在查找的页面,因为使用了无效方法(HTTP 谓词)。 经过在一番搜索,发现问题出在 IIS 设置上。下面通过设...
阅读全文
posted @ 2019-03-04 15:26 Jöhan
阅读(679)
评论(0)
推荐(0)
ABP 扩展 Role 数据实体(新增字段)
摘要: Role 数据实体 继承自 AbpRole 类,并且 AbpRole 是 abstract 类型。所以新增属性直接添加在 Role 中即可。效果如下:最后再重新执行迁移就生效了。迁移命令Add-Migration...
阅读全文
posted @ 2019-03-04 15:11 Jöhan
阅读(439)
评论(0)
推荐(0)
2019年2月27日
C# EntityFramework 自定义数据库表名(一)
摘要: 在数据实体上加 Table 属性,效果如下命名空间using System.ComponentModel.DataAnnotations.Schema;特别注意属性名称是 Table 一不小心会写成 TableN...
阅读全文
posted @ 2019-02-27 09:46 Jöhan
阅读(397)
评论(0)
推荐(0)
2019年2月21日
EPPlus.Core(OfficeOpenXml) 获取 Excel 数据集合
摘要: /// /// 获取 Excel Sheet 数据集合/// /// 文件路径/// Sheets下标,可选参数默认 0/// public List GetSheetValues(string path, in...
阅读全文
posted @ 2019-02-21 13:02 Jöhan
阅读(354)
评论(0)
推荐(0)
2019年2月19日
C# 获取文件并将文件按创建/修改时间排序
摘要: public class FileComparer : IComparer{ /// /// 文件排序 /// /// /// /// int ICompare...
阅读全文
posted @ 2019-02-19 09:20 Jöhan
阅读(2727)
评论(0)
推荐(1)
2019年2月14日
C# 计算两个日期之间的月份数(差值)
摘要: var months = ((DateTime.Now.Year - baseDate.Year) * 12) + DateTime.Now.Month - baseDate.Month;(当前日期年份 - 目标...
阅读全文
posted @ 2019-02-14 11:43 Jöhan
阅读(6475)
评论(0)
推荐(0)
2019年2月11日
C# Split 方法扩展支持双引号
摘要: public static string[] Split(this string source, string str){ var list = new List(); while (true) ...
阅读全文
posted @ 2019-02-11 10:23 Jöhan
阅读(348)
评论(0)
推荐(0)
2019年2月2日
教你在 C# 代码中写出带高亮关键字的注释
摘要: Visual Studio 在个人职业生涯中使用率一直比较靠前的,一个强大的 IDE 可以帮助开发过程中省不少时间,甚至起到决定成败的关键。就像之前听大神说过这样一句话“离开 IDE 你什么都不是”,仔细一琢磨其...
阅读全文
posted @ 2019-02-02 11:30 Jöhan
阅读(414)
评论(1)
推荐(1)
2019年1月28日
ABP 部署遇到的问题(记录)
摘要: 同一个服务部署在局域网 192.168.6.19 上域名 xxx.xxx.xxx(xxx)局域网 IP 地址 192.168.6.19:8002公网 IP 地址 221.178.13.190:80 测试用帐号来自...
阅读全文
posted @ 2019-01-28 11:19 Jöhan
阅读(289)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
下一页
公告