Add unit test

This commit is contained in:
sunkaixuan 2023-08-11 18:08:58 +08:00
parent fc67f25191
commit c12a3530a3

View File

@ -45,9 +45,21 @@ namespace OrmTest
{
Name = "a"
}).Where(it => it.Id != null).ExecuteCommand();
db.CodeFirst.InitTables<CodeFirstDFAAFA>();
db.Insertable(new List<CodeFirstDFAAFA>() {
new CodeFirstDFAAFA(){ timeOffset=DateTimeOffset.Now,timeOffset2=DateTimeOffset.Now },
new CodeFirstDFAAFA() { timeOffset = DateTimeOffset.Now, timeOffset2 = DateTimeOffset.Now }
}).ExecuteCommand();
Console.WriteLine("#### CodeFirst end ####");
}
}
public class CodeFirstDFAAFA
{
public DateTimeOffset timeOffset{ get; set; }
[SugarColumn(ColumnDataType = "timestamp with time zone")]
public DateTimeOffset timeOffset2 { get; set; }
}
public class CodeFirstNoUpper4
{
[SugarColumn(IsPrimaryKey = true)]