mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Add demo
This commit is contained in:
parent
12a5c471e9
commit
b9eb57b809
@ -123,9 +123,21 @@ static void ServerTest()
|
|||||||
sqlugar.Insertable(new Unitadfafa() { Id =1 }).ExecuteCommand();
|
sqlugar.Insertable(new Unitadfafa() { Id =1 }).ExecuteCommand();
|
||||||
var list2=sqlugar.Queryable<Unitadfafa>().ToList();
|
var list2=sqlugar.Queryable<Unitadfafa>().ToList();
|
||||||
|
|
||||||
|
sqlugar.CodeFirst.InitTables<UnitDatezaaaa>();
|
||||||
|
|
||||||
|
var xx = sqlugar.Fastest<UnitDatezaaaa>().BulkCopy(new List<UnitDatezaaaa>() { (new UnitDatezaaaa()
|
||||||
|
{
|
||||||
|
|
||||||
|
} )});
|
||||||
|
var xx2 = sqlugar.Fastest<UnitDatezaaaa>().BulkCopy(new List<UnitDatezaaaa>() { (new UnitDatezaaaa()
|
||||||
|
{
|
||||||
|
timeOnly=TimeOnly.FromDateTime(DateTime.Now),
|
||||||
|
dateOnly=DateOnly.FromDateTime(DateTime.Now)
|
||||||
|
} )});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void SqliteTest()
|
static void SqliteTest()
|
||||||
{
|
{
|
||||||
var sqlugar = new SqlSugarClient(new ConnectionConfig()
|
var sqlugar = new SqlSugarClient(new ConnectionConfig()
|
||||||
@ -187,6 +199,13 @@ 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 UnitDatezaaaa
|
||||||
|
{
|
||||||
|
[SugarColumn(IsNullable =true)]
|
||||||
|
public TimeOnly? timeOnly { get; set; }
|
||||||
|
[SugarColumn(IsNullable = true)]
|
||||||
|
public DateOnly? dateOnly { get; set; }
|
||||||
|
}
|
||||||
public class UnitDatez211afa2222
|
public class UnitDatez211afa2222
|
||||||
{
|
{
|
||||||
[SugarColumn(IsNullable =true)]
|
[SugarColumn(IsNullable =true)]
|
||||||
|
Loading…
Reference in New Issue
Block a user