diff --git a/Src/Asp.NetCore2/MySqlTest/Demo/DemoE_CodeFirst.cs b/Src/Asp.NetCore2/MySqlTest/Demo/DemoE_CodeFirst.cs index 3d1154426..b21e5af2d 100644 --- a/Src/Asp.NetCore2/MySqlTest/Demo/DemoE_CodeFirst.cs +++ b/Src/Asp.NetCore2/MySqlTest/Demo/DemoE_CodeFirst.cs @@ -1,4 +1,5 @@ -using SqlSugar; +using Newtonsoft.Json.Linq; +using SqlSugar; using System; using System.Collections.Generic; using System.Linq; @@ -29,9 +30,16 @@ namespace OrmTest db.CodeFirst.InitTables(); db.Insertable(new Charafafa2() { TimeSpanTimeSpan = TimeSpan.FromSeconds(1) }).ExecuteCommand(); var list2=db.Queryable().ToList(); + db.CodeFirst.InitTables(); + db.Insertable(new Codeafadfa() { Array = JArray.FromObject(new string[] { "a" }) }).ExecuteCommand(); Console.WriteLine("#### CodeFirst end ####"); } } + public class Codeafadfa + { + [SugarColumn(ColumnDataType ="varchar(500)" )] + public object Array { get; set; } + } public class Charafafa2 { public TimeSpan TimeSpanTimeSpan { get; set; }