From 19874ca8658d3e1bfa45afe75f552e8785a4549f Mon Sep 17 00:00:00 2001 From: SUNKAIXUAN <610262374@qq.com> Date: Mon, 29 Mar 2021 16:32:04 +0800 Subject: [PATCH] Update unit --- Src/Asp.Net/PgSqlTest/UnitTest/UJson.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Src/Asp.Net/PgSqlTest/UnitTest/UJson.cs b/Src/Asp.Net/PgSqlTest/UnitTest/UJson.cs index a7fd05df8..156a31859 100644 --- a/Src/Asp.Net/PgSqlTest/UnitTest/UJson.cs +++ b/Src/Asp.Net/PgSqlTest/UnitTest/UJson.cs @@ -1,4 +1,5 @@ -using System; +using SqlSugar; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -20,10 +21,17 @@ namespace OrmTest list= Db.Queryable().ToList(); UValidate.Check("order2", list.First().Order.Name, "Json"); var list2 = Db.Queryable().ToList(); + Db.CodeFirst.InitTables(); + Db.Insertable(new UnitArray2() { MenuIds = new float[] { 1, 2 } }).ExecuteCommand(); + var x=Db.Queryable().ToList(); } } - + public class UnitArray2 + { + [SugarColumn(ColumnDataType = "real []", IsArray = true)] + public float[] MenuIds { get; set; } + } public class UnitJsonTest { [SqlSugar.SugarColumn(IsPrimaryKey = true, IsIdentity = true)]