摘要: 在 ABP 中有一个 IShouldNormalize 接口,内部只有一个方法 Normalize。主要场景用于 Dtonamespace Abp.Runtime.Validation{ // // ... 阅读全文
posted @ 2019-04-25 19:59 Jöhan 阅读(255) 评论(0) 推荐(0) 编辑
摘要: 在ABP实际开发过程中既有可能会遇到不希望将某些方法暴露,那么就需要想办法将接口隐藏起来。方法一:通过修改修饰符实现。例如将方法修改为 private,这种方式比较常用。但这种方式就将方法的访问范围限制在当前类。... 阅读全文
posted @ 2019-04-22 19:42 Jöhan 阅读(847) 评论(0) 推荐(0) 编辑
摘要: 在 Gitk 查看到的中文信息一般会出现乱码,这是因为 Git 的默认编码规则是 System(cp936)。知道这个信息后,我们就可以通过修改编码规则使中文可以正常显示,修改方式如下:1.通过命令打开 Gitk... 阅读全文
posted @ 2019-04-18 09:25 Jöhan 阅读(167) 评论(0) 推荐(0) 编辑
摘要: public static class AbpExtensions{ /// /// 返回10位时间戳 Timestamp /// /// /// public sta... 阅读全文
posted @ 2019-04-15 14:56 Jöhan 阅读(2008) 评论(0) 推荐(0) 编辑
摘要: 找到一个继承 AbpModule 的类,在 PreInitialize() 方法中有一个 ConfigureTokenAuth() 方法,上图中最后一句 Expiration 就是过期时间了。注意这种方式是最便... 阅读全文
posted @ 2019-04-08 10:40 Jöhan 阅读(999) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(1726) 评论(0) 推荐(0) 编辑
摘要: 1.在 Core.Shared.PasswordComplexitySettingStore 中定义了密码规则的 Dto Security.PasswordComplexitySetting.cs 该 Dto 定... 阅读全文
posted @ 2019-03-25 14:31 Jöhan 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 三种方式分别执行一百万次转换用时:new Guid():258 msGuid.Parse():269 msGuid.TryParse():267 ms可以看出耗时差距微乎其微,并且以上代码在不同硬件环境下所耗时也... 阅读全文
posted @ 2019-03-18 14:59 Jöhan 阅读(536) 评论(0) 推荐(0) 编辑
摘要: 可能会在下面的场景中需要循环枚举值1、为方便前端展示,将返回的数据集合中的枚举名称显示出来。这样前端不需要做任何处理,直接展示即可。2、向前端输出枚举集合,用于数据筛选,并且前端不需要维护这些集合。后端有修改也不... 阅读全文
posted @ 2019-03-15 10:09 Jöhan 阅读(824) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Reflection;using System.Threading.Tasks;using Nito.AsyncEx;namespace Abp.Threadi... 阅读全文
posted @ 2019-03-13 10:02 Jöhan 阅读(544) 评论(0) 推荐(0) 编辑
摘要: OrganizationUnit 数据实体因为没有 abstract,相比 Role 加字段有点些不一样的地方,下面是实现步骤:1.新增 OrganizationUnitExtend 并继承 Abp.Organi... 阅读全文
posted @ 2019-03-11 10:59 Jöhan 阅读(685) 评论(0) 推荐(0) 编辑
摘要: 返回结果为: HTTP 错误 405.0 - Method Not Allowed 无法显示您正在查找的页面,因为使用了无效方法(HTTP 谓词)。 经过在一番搜索,发现问题出在 IIS 设置上。下面通过设... 阅读全文
posted @ 2019-03-04 15:26 Jöhan 阅读(590) 评论(0) 推荐(0) 编辑
摘要: Role 数据实体 继承自 AbpRole 类,并且 AbpRole 是 abstract 类型。所以新增属性直接添加在 Role 中即可。效果如下:最后再重新执行迁移就生效了。迁移命令Add-Migration... 阅读全文
posted @ 2019-03-04 15:11 Jöhan 阅读(413) 评论(0) 推荐(0) 编辑
摘要: 在数据实体上加 Table 属性,效果如下命名空间using System.ComponentModel.DataAnnotations.Schema;特别注意属性名称是 Table 一不小心会写成 TableN... 阅读全文
posted @ 2019-02-27 09:46 Jöhan 阅读(377) 评论(0) 推荐(0) 编辑
摘要: /// /// 获取 Excel Sheet 数据集合/// /// 文件路径/// Sheets下标,可选参数默认 0/// public List GetSheetValues(string path, in... 阅读全文
posted @ 2019-02-21 13:02 Jöhan 阅读(293) 评论(0) 推荐(0) 编辑
摘要: public class FileComparer : IComparer{ /// /// 文件排序 /// /// /// /// int ICompare... 阅读全文
posted @ 2019-02-19 09:20 Jöhan 阅读(2409) 评论(0) 推荐(1) 编辑
摘要: var months = ((DateTime.Now.Year - baseDate.Year) * 12) + DateTime.Now.Month - baseDate.Month;(当前日期年份 - 目标... 阅读全文
posted @ 2019-02-14 11:43 Jöhan 阅读(5516) 评论(0) 推荐(0) 编辑
摘要: public static string[] Split(this string source, string str){ var list = new List(); while (true) ... 阅读全文
posted @ 2019-02-11 10:23 Jöhan 阅读(328) 评论(0) 推荐(0) 编辑
摘要: Visual Studio 在个人职业生涯中使用率一直比较靠前的,一个强大的 IDE 可以帮助开发过程中省不少时间,甚至起到决定成败的关键。就像之前听大神说过这样一句话“离开 IDE 你什么都不是”,仔细一琢磨其... 阅读全文
posted @ 2019-02-02 11:30 Jöhan 阅读(345) 评论(1) 推荐(1) 编辑
摘要: 同一个服务部署在局域网 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 阅读(257) 评论(0) 推荐(0) 编辑