QuestDbSupport Index

This commit is contained in:
sunkaixuan
2022-07-31 17:48:25 +08:00
parent e5cacb08ca
commit 9fd461d508
2 changed files with 64 additions and 0 deletions

View File

@@ -23,10 +23,18 @@ namespace OrmTest
db.CodeFirst.InitTables(typeof(CodeFirstTable1));//Create CodeFirstTable1
db.Insertable(new CodeFirstTable1() { Name = "a", Text="a" }).ExecuteCommand();
var list = db.Queryable<CodeFirstTable1>().ToList();
db.CodeFirst.InitTables<IndexClass>();
Console.WriteLine("#### CodeFirst end ####");
}
}
[SugarIndex(null,nameof(IndexClass.Name),OrderByType.Asc)]
public class IndexClass
{
public int Id { get; set; }
[SugarColumn(ColumnDataType ="symbol")]
public string Name { get; set; }
}
public class CodeFirstTable1
{
[SugarColumn(IsIdentity = true, IsPrimaryKey = true)]