mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-21 02:58:05 +08:00
Add unit test
This commit is contained in:
@@ -70,9 +70,23 @@ namespace OrmTest
|
||||
db.Insertable(new Unittest1011() { name = "a" }).ExecuteCommand();
|
||||
db.Insertable(new Unittest22221() { name = "a" }).ExecuteCommand();
|
||||
db.CodeFirst.InitTables<Unitrtqqqadfa>();
|
||||
db.CodeFirst.InitTables<Unitrasdfafa>();
|
||||
var id=db.Insertable(new Unitrasdfafa() { Name = "Unitrasdfafa" }).ExecuteReturnIdentity();
|
||||
db.Updateable(new Unitrasdfafa() { Name = "Unitrasdfafa", id = id }).ExecuteCommand();
|
||||
var xx=db.Queryable<Unitrasdfafa>().Select("*").ToDataTable();
|
||||
Console.WriteLine("#### CodeFirst end ####");
|
||||
}
|
||||
}
|
||||
|
||||
[SugarTable("Unitrasdfafa",Discrimator ="Type:1,Type2:2")]
|
||||
public class Unitrasdfafa
|
||||
{
|
||||
|
||||
[SugarColumn(IsIdentity =true,IsPrimaryKey =true)]
|
||||
public int id { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
|
||||
[SugarTable("dbo.Unitrtqqqadfa")]
|
||||
public class Unitrtqqqadfa
|
||||
{
|
||||
|
Reference in New Issue
Block a user