mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-06-28 13:34:32 +08:00
Update demo
This commit is contained in:
parent
9eaae31945
commit
ca9f4d0298
@ -40,6 +40,12 @@ static void MyTest()
|
|||||||
|
|
||||||
var d1 = new UnitDate01231().dateOnly;
|
var d1 = new UnitDate01231().dateOnly;
|
||||||
var d2 = new UnitDate01231().timeOnly;
|
var d2 = new UnitDate01231().timeOnly;
|
||||||
|
if(sqlugar.DbMaintenance.IsAnyTable("UnitDatez211afa2222",false))
|
||||||
|
sqlugar.DbMaintenance.DropTable<UnitDatez211afa2222>();
|
||||||
|
sqlugar.CodeFirst.InitTables<UnitDatez211afa2222>();
|
||||||
|
sqlugar.Insertable(new UnitDatez211afa2222()).ExecuteCommand();
|
||||||
|
sqlugar.Insertable(new UnitDatez211afa2222() { dateOnly=DateOnly.FromDateTime(DateTime.Now) }).ExecuteCommand();
|
||||||
|
var list2=sqlugar.Queryable<UnitDatez211afa2222>().ToList();
|
||||||
}
|
}
|
||||||
static void ServerTest()
|
static void ServerTest()
|
||||||
{
|
{
|
||||||
@ -130,4 +136,11 @@ public class UnitDatez211afa
|
|||||||
{
|
{
|
||||||
public TimeOnly timeOnly { get; set; }
|
public TimeOnly timeOnly { get; set; }
|
||||||
public DateOnly dateOnly { get; set; }
|
public DateOnly dateOnly { get; set; }
|
||||||
|
}
|
||||||
|
public class UnitDatez211afa2222
|
||||||
|
{
|
||||||
|
[SugarColumn(IsNullable =true)]
|
||||||
|
public TimeOnly? timeOnly { get; set; }
|
||||||
|
[SugarColumn(IsNullable = true)]
|
||||||
|
public DateOnly? dateOnly { get; set; }
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user