mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
Add Demo
This commit is contained in:
parent
7d862c8ae9
commit
2cb7781e72
@ -36,6 +36,8 @@ namespace OrmTest
|
|||||||
Console.Write(db.Queryable<GuidTest>().First().A);
|
Console.Write(db.Queryable<GuidTest>().First().A);
|
||||||
db.Updateable<GuidTest>(new GuidTest() { A = Guid.NewGuid(), Id = Id }).ExecuteCommand();
|
db.Updateable<GuidTest>(new GuidTest() { A = Guid.NewGuid(), Id = Id }).ExecuteCommand();
|
||||||
Console.Write(db.Queryable<GuidTest>().First().A);
|
Console.Write(db.Queryable<GuidTest>().First().A);
|
||||||
|
db.CodeFirst.InitTables<GuidTest2>();
|
||||||
|
db.Insertable(new GuidTest2() { }).ExecuteReturnSnowflakeId();
|
||||||
}
|
}
|
||||||
private static void TestBool(SqlSugarClient db)
|
private static void TestBool(SqlSugarClient db)
|
||||||
{
|
{
|
||||||
@ -48,6 +50,12 @@ namespace OrmTest
|
|||||||
Console.Write(db.Queryable<BoolTest>().First().A);
|
Console.Write(db.Queryable<BoolTest>().First().A);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public class GuidTest2
|
||||||
|
{
|
||||||
|
[SugarColumn(IsPrimaryKey = true)]
|
||||||
|
public long Id { get; set; }
|
||||||
|
public Guid? A { get; set; }
|
||||||
|
}
|
||||||
public class GuidTest
|
public class GuidTest
|
||||||
{
|
{
|
||||||
[SugarColumn(IsPrimaryKey = true)]
|
[SugarColumn(IsPrimaryKey = true)]
|
||||||
|
Loading…
Reference in New Issue
Block a user