mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Update demo
This commit is contained in:
parent
5962ce982c
commit
128a7ac8a3
@ -39,13 +39,11 @@ namespace TDengineTest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//插入并且自动建子表
|
//插入并且自动建子表
|
||||||
InsertUsingTag(db);
|
InsertUsingTag(db);
|
||||||
|
|
||||||
//建表
|
|
||||||
CodeFirst(db);
|
|
||||||
|
|
||||||
//生成实体
|
//生成实体
|
||||||
DbFirst(db);
|
DbFirst(db);
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
using SqlSugar.TDengine;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -9,8 +10,17 @@ namespace TDengineTest
|
|||||||
public partial class ORMTest
|
public partial class ORMTest
|
||||||
{
|
{
|
||||||
public static void InsertUsingTag(SqlSugarClient db)
|
public static void InsertUsingTag(SqlSugarClient db)
|
||||||
|
{
|
||||||
|
db.CodeFirst.InitTables<SUsingTagModel>();
|
||||||
|
}
|
||||||
|
[STableAttribute(STableName = "SUsingTagModel", Tag1 = nameof(Tag1))]
|
||||||
|
public class SUsingTagModel
|
||||||
{
|
{
|
||||||
|
[SqlSugar.SugarColumn(IsPrimaryKey = true)]
|
||||||
|
public DateTime Ts { get; set; }
|
||||||
|
public bool Boolean { get; set; }
|
||||||
|
[SqlSugar.SugarColumn(IsIgnore = true)]
|
||||||
|
public string Tag1 { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user