mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Update demo
This commit is contained in:
parent
2bfe8122c1
commit
d77d903c68
@ -1,5 +1,6 @@
|
|||||||
using OrmTest;
|
using OrmTest;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
using SqlSugar.TDengine;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -21,6 +22,9 @@ namespace TDengineTest
|
|||||||
|
|
||||||
CodeFirst4(db);
|
CodeFirst4(db);
|
||||||
|
|
||||||
|
//多标签建表
|
||||||
|
CodeFirst5(db);
|
||||||
|
|
||||||
db.CodeFirst.InitTables<TDHistoryValue>();
|
db.CodeFirst.InitTables<TDHistoryValue>();
|
||||||
|
|
||||||
//更多建表用例
|
//更多建表用例
|
||||||
@ -49,6 +53,20 @@ namespace TDengineTest
|
|||||||
var list3 = db.Queryable<CodeFirst03>().ToList();
|
var list3 = db.Queryable<CodeFirst03>().ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void CodeFirst5(SqlSugarClient db)
|
||||||
|
{
|
||||||
|
|
||||||
|
STable.Tags = new List<ColumnTagInfo>()
|
||||||
|
{
|
||||||
|
new ColumnTagInfo(){ Name="t1", Value="1" },
|
||||||
|
new ColumnTagInfo(){ Name="t2",Value="2"}
|
||||||
|
};
|
||||||
|
|
||||||
|
db.CodeFirst.InitTables<CodeFirstTags1>();
|
||||||
|
STable.Tags = null;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private static void CodeFirst1(SqlSugarClient db)
|
private static void CodeFirst1(SqlSugarClient db)
|
||||||
{
|
{
|
||||||
db.CodeFirst.InitTables<CodeFirst01>();
|
db.CodeFirst.InitTables<CodeFirst01>();
|
||||||
|
@ -44,6 +44,14 @@ namespace TDengineTest
|
|||||||
public DateTime Ts { get; set; }
|
public DateTime Ts { get; set; }
|
||||||
public bool Boolean { get; set; }
|
public bool Boolean { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class CodeFirstTags1:STable
|
||||||
|
{
|
||||||
|
[SqlSugar.SugarColumn(IsPrimaryKey = true)]
|
||||||
|
public DateTime Ts { get; set; }
|
||||||
|
public bool Boolean { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class CodeFirst04
|
public class CodeFirst04
|
||||||
{
|
{
|
||||||
[SqlSugar.SugarColumn(IsPrimaryKey = true)]
|
[SqlSugar.SugarColumn(IsPrimaryKey = true)]
|
||||||
|
Loading…
Reference in New Issue
Block a user