From 223a974e00c069dca55a071b5dabd3c97930a969 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Thu, 17 Nov 2022 16:30:53 +0800 Subject: [PATCH] Add demo --- Src/Asp.Net/PgSqlTest/Demo/DemoE_CodeFirst.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Src/Asp.Net/PgSqlTest/Demo/DemoE_CodeFirst.cs b/Src/Asp.Net/PgSqlTest/Demo/DemoE_CodeFirst.cs index 401eda225..2f6730316 100644 --- a/Src/Asp.Net/PgSqlTest/Demo/DemoE_CodeFirst.cs +++ b/Src/Asp.Net/PgSqlTest/Demo/DemoE_CodeFirst.cs @@ -38,9 +38,21 @@ namespace OrmTest db.CodeFirst.InitTables(); db.DbMaintenance.TruncateTable(); db.Storageable(new CodeFirstEnum() { dbType = DbType.Access, Name = "a" }).ExecuteCommand(); + db.CodeFirst.InitTables(); + db.Insertable(new List() { + new CodeFirstArray() { floats = new float[] { 1 } }, + new CodeFirstArray() { floats = new float[] { 1 } } + + }).ExecuteCommand(); + var list5=db.Queryable().ToList(); Console.WriteLine("#### CodeFirst end ####"); } } + public class CodeFirstArray + { + [SugarColumn(IsArray =true,ColumnDataType = "real[]")] + public float[] floats { get; set; } + } public class CodeFirstEnum { [SugarColumn(IsPrimaryKey =true)]