Update CodeFirst CreateIndex

This commit is contained in:
sunkaixuan
2022-06-25 14:36:36 +08:00
parent 2a20d4748e
commit 33a0662565
2 changed files with 9 additions and 1 deletions

View File

@@ -21,6 +21,13 @@ namespace OrmTest
Db.Insertable(new UnitCodeFirst131() { Id = 1 }).ExecuteCommand();
Db.CodeFirst.InitTables<UNITCODEFIRST131>();
Db.CodeFirst.InitTables<UNITCOdEFIRST131>();
Db.CodeFirst.InitTables<UnitIndextest>();
}
[SqlSugar.SugarIndex("UnitIndextestIndex", nameof(UnitIndextest.Table),SqlSugar.OrderByType.Asc)]
public class UnitIndextest
{
public string Table { get; set; }
public string Id { get; set; }
}
public class UnitCodeFirst131
{