From 212bf9bd4814964a76773c4bfde181e83963932a Mon Sep 17 00:00:00 2001 From: BlueSky-AI <9901810@qq.com> Date: Thu, 14 Sep 2023 10:53:07 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E9=AA=8C=E8=AF=81=E7=9A=84=E5=91=BD=E5=90=8D?= =?UTF-8?q?=E7=A9=BA=E9=97=B4"System.ComponentModel.DataAnnotations"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- XCode/Code/EntityBuilder.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/XCode/Code/EntityBuilder.cs b/XCode/Code/EntityBuilder.cs index 357ba762a..9aa5f680e 100644 --- a/XCode/Code/EntityBuilder.cs +++ b/XCode/Code/EntityBuilder.cs @@ -234,6 +234,7 @@ protected virtual void AddNameSpace() us.Add("XCode.Cache"); us.Add("XCode.Configuration"); us.Add("XCode.DataAccessLayer"); + us.Add("System.ComponentModel.DataAnnotations");//属性验证 //us.Add("XCode.Common"); if (Business) us.Add("XCode.Shards"); From 7beef61933b0d77e891011be9bd33be9df5ab269 Mon Sep 17 00:00:00 2001 From: BlueSky-AI <9901810@qq.com> Date: Thu, 14 Sep 2023 16:41:00 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=94=9F=E6=88=90=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=97=B6=EF=BC=8C=E6=8C=87=E5=AE=9A=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E5=90=8D=E3=80=82=E5=B1=9E=E6=80=A7=E5=90=8D=E7=9A=84?= =?UTF-8?q?=E7=BB=84=E6=88=90=E4=B8=BA=EF=BC=9A{table.Name}Info?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- XCode/DataAccessLayer/Model/ModelHelper.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/XCode/DataAccessLayer/Model/ModelHelper.cs b/XCode/DataAccessLayer/Model/ModelHelper.cs index 73c2ccc3b..dae9dd438 100644 --- a/XCode/DataAccessLayer/Model/ModelHelper.cs +++ b/XCode/DataAccessLayer/Model/ModelHelper.cs @@ -379,8 +379,7 @@ static IDataTable ProcessNeedHistory(IDataTable table) col.DataType = typeof(DateTime); col.Name = table.Name + "ID"; col.DataType = typeof(Int32); - //Customer @Id@$ - col.Map = table.Name + "@ID@$"; + col.Map = $"{table.Name}@ID@$@{table.Name}Info"; historydataTable.Columns.Insert(1, col); return historydataTable;