This commit is contained in:
sunkaixuan 2023-07-21 12:59:14 +08:00
parent 72956ce93a
commit 22087c94cc

View File

@ -74,9 +74,18 @@ namespace OrmTest
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();
db.CodeFirst.InitTables<UintEnumpk>();
db.Deleteable<UintEnumpk>().Where(it => true).ExecuteCommand();
db.Insertable(new UintEnumpk() { dbType = DbType.Sqlite }).ExecuteCommand();
db.Deleteable(new UintEnumpk() { dbType = DbType.Sqlite }).ExecuteCommand();
Console.WriteLine("#### CodeFirst end ####");
}
}
public class UintEnumpk
{
[SugarColumn(IsPrimaryKey =true)]
public DbType dbType { get; set; }
}
[SugarTable("Unitrasdfafa",Discrimator ="Type:1,Type2:2")]
public class Unitrasdfafa