mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 02:29:39 +08:00
Add demo
This commit is contained in:
@@ -35,6 +35,9 @@ namespace OrmTest
|
|||||||
.PartitionBy(it => new { it.Ts, it.Id }).ToList();
|
.PartitionBy(it => new { it.Ts, it.Id }).ToList();
|
||||||
db.CodeFirst.InitTables<GuidTest22>();
|
db.CodeFirst.InitTables<GuidTest22>();
|
||||||
db.DbFirst.CreateClassFile("c:\\demo\\11");
|
db.DbFirst.CreateClassFile("c:\\demo\\11");
|
||||||
|
db.CodeFirst.InitTables<FloatTestdfa>();
|
||||||
|
db.Insertable(new FloatTestdfa() { A = 1 }).ExecuteCommand();
|
||||||
|
var list3=db.Queryable<FloatTestdfa>().ToList();
|
||||||
Console.WriteLine("#### CodeFirst end ####");
|
Console.WriteLine("#### CodeFirst end ####");
|
||||||
}
|
}
|
||||||
private static void TestGuid(SqlSugarClient db)
|
private static void TestGuid(SqlSugarClient db)
|
||||||
@@ -59,6 +62,11 @@ namespace OrmTest
|
|||||||
Console.Write(db.Queryable<BoolTest5>().First(it => it.Id == Id).A);
|
Console.Write(db.Queryable<BoolTest5>().First(it => it.Id == Id).A);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
[SugarTable("FloatTestdfa1")]
|
||||||
|
public class FloatTestdfa
|
||||||
|
{
|
||||||
|
public float A { get; set; }
|
||||||
|
}
|
||||||
public class GuidTest
|
public class GuidTest
|
||||||
{
|
{
|
||||||
[SugarColumn(IsPrimaryKey = true)]
|
[SugarColumn(IsPrimaryKey = true)]
|
||||||
|
Reference in New Issue
Block a user