mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Update TDengine demo
This commit is contained in:
parent
381f9691cc
commit
c4c6791ac7
@ -7,6 +7,7 @@ using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SqlSugar;
|
||||
using SqlSugar.DbConvert;
|
||||
|
||||
namespace TDengineTest
|
||||
{
|
||||
@ -26,6 +27,16 @@ namespace TDengineTest
|
||||
{
|
||||
Console.WriteLine(UtilMethods.GetNativeSql(sql, p));
|
||||
}
|
||||
},
|
||||
ConfigureExternalServices = new ConfigureExternalServices()
|
||||
{
|
||||
EntityService= (property, column) =>
|
||||
{
|
||||
if (column.SqlParameterDbType == null)
|
||||
{
|
||||
column.SqlParameterDbType = typeof(CommonPropertyConvert);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -3,6 +3,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using SqlSugar.DbConvert;
|
||||
namespace TDengineTest
|
||||
{
|
||||
public partial class ORMTest
|
||||
@ -21,7 +22,17 @@ namespace TDengineTest
|
||||
{
|
||||
DbType = SqlSugar.DbType.TDengine,
|
||||
IsAutoCloseConnection = true,
|
||||
ConnectionString = "Host=localhost;Port=6030;Username=root;Password=taosdata;Database=nstest;TsType=config_ns"
|
||||
ConnectionString = "Host=localhost;Port=6030;Username=root;Password=taosdata;Database=nstest;TsType=config_ns",
|
||||
ConfigureExternalServices = new ConfigureExternalServices()
|
||||
{
|
||||
EntityService = (property, column) =>
|
||||
{
|
||||
if (column.SqlParameterDbType == null)
|
||||
{
|
||||
column.SqlParameterDbType = typeof(CommonPropertyConvert);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//删除库-库上限比太少只能删了测试
|
||||
@ -97,7 +108,17 @@ VALUES ('2023-09-23', ""10.2"", ""A219"",""2309050001"",""B03123"",""OK"",""681-
|
||||
{
|
||||
DbType = SqlSugar.DbType.TDengine,
|
||||
IsAutoCloseConnection = true,
|
||||
ConnectionString = "Host=localhost;Port=6030;Username=root;Password=taosdata;Database=nstest;TsType=config_us"
|
||||
ConnectionString = "Host=localhost;Port=6030;Username=root;Password=taosdata;Database=nstest;TsType=config_us",
|
||||
ConfigureExternalServices = new ConfigureExternalServices()
|
||||
{
|
||||
EntityService = (property, column) =>
|
||||
{
|
||||
if (column.SqlParameterDbType == null)
|
||||
{
|
||||
column.SqlParameterDbType = typeof(CommonPropertyConvert);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
//删除库-库上限比太少只能删了测试
|
||||
db.Ado.ExecuteCommand("drop database nstest");
|
||||
|
Loading…
Reference in New Issue
Block a user