From 65f636d04b3f418eda9de83083b5afcdf539fb29 Mon Sep 17 00:00:00 2001 From: 28810 <28810@YEXIANGQIN> Date: Thu, 5 Dec 2019 21:23:15 +0800 Subject: [PATCH] update --- 实体特性.md | 17 +++-------------- 更新日志.md | 6 +++++- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/实体特性.md b/实体特性.md index d2ee23f..4c944dd 100644 --- a/实体特性.md +++ b/实体特性.md @@ -57,7 +57,9 @@ class Topic { 可以在类型上指定 NOT NULL,也可以通过 [Column(IsNullable = false)] 设置; -> 0.9.12 版本增加了对 MaxLength 特性的解析,避免字符串常用时的麻烦,上面的 varchar(128) 可改写成: +> 0.12.8 版本增加了 [Column(StringLength = 128)] 针对字符串的长度设置; + +> 0.9.12 版本增加了对 MaxLength 特性的解析,上面的 varchar(128) 可改写成: ```csharp class Topic { @@ -66,19 +68,6 @@ class Topic { } ``` - 说明:由于内部按名称反射查找特性的,所以 MaxLengthAttribute 可以在任意地方定义。 - 该特性通常定义在 System.ComponentModel.DataAnnotations.MaxLengthAttribute。 - 如果找不到该类,可自行在项目中定义名称为 MaxLengthAttribute 的特性类,如下: - - public class MaxLengthAttribute : Attribute - { - public int Length { get; } - public MaxLengthAttribute(int length) - { - this.Length = length; - } - } - ## 服务器时间(ServerTime) ```csharp diff --git a/更新日志.md b/更新日志.md index ab4b105..5d9c652 100644 --- a/更新日志.md +++ b/更新日志.md @@ -1,9 +1,13 @@ 完整版本:年数-月-日-当日版本号,FreeSql、FreeSql.Repository、FreeSql.DbContext 版本号相同。 -## v0.12.8(预告) +## v0.12.8 - 优化 IncludeMany 级联查询支持异步适配(之前是同步方式); +- 优化 MaxLength 功能,并且增加 [Column(StringLength = 100)] 同等的特性功能; +- 优化 GlobalFilter Apply 自动重命名表达式参数名,避免内容重复问题; +- 修复 表达式解析 Guid.NewGuid() 的错误; +- 补充 GetTableByEntity 当属性名或特性名重复时的友好错误提示; ## v0.12.7