mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-25 02:09:12 +08:00
Update CodeFirst
This commit is contained in:
@@ -44,6 +44,14 @@ namespace OrmTest
|
||||
catch
|
||||
{
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Db.Ado.ExecuteCommand(@" create schema [user]");
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
db.CodeFirst.InitTables<UnitTableName>();
|
||||
db.CodeFirst.InitTables<UnitGe>();
|
||||
db.Insertable(new UnitGe() { geometry1 = "POINT (20 180)" }).ExecuteCommand();
|
||||
@@ -58,6 +66,7 @@ namespace OrmTest
|
||||
Db.Insertable(new UnitCodeFirst131() { Id = 1 }).ExecuteCommand();
|
||||
Db.CodeFirst.InitTables<UNITCODEFIRST131>();
|
||||
Db.CodeFirst.InitTables<UNITCOdEFIRST131>();
|
||||
Db.CodeFirst.InitTables<UnitTableUserName>();
|
||||
}
|
||||
public class UnitCodeFirst131
|
||||
{
|
||||
@@ -107,6 +116,11 @@ namespace OrmTest
|
||||
public TimeSpan Id { get; set; }
|
||||
public TimeSpan id2 { get; set; }
|
||||
}
|
||||
[SugarTable("user.UnitTableUserName", "备注")]
|
||||
public class UnitTableUserName
|
||||
{
|
||||
public string Id { get; set; }
|
||||
}
|
||||
public class UnitTest0122132
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user