mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-06-28 13:34:32 +08:00
Add unit test
This commit is contained in:
parent
fc67f25191
commit
c12a3530a3
@ -45,9 +45,21 @@ namespace OrmTest
|
|||||||
{
|
{
|
||||||
Name = "a"
|
Name = "a"
|
||||||
}).Where(it => it.Id != null).ExecuteCommand();
|
}).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 ####");
|
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
|
public class CodeFirstNoUpper4
|
||||||
{
|
{
|
||||||
[SugarColumn(IsPrimaryKey = true)]
|
[SugarColumn(IsPrimaryKey = true)]
|
||||||
|
Loading…
Reference in New Issue
Block a user