mirror of
https://github.com/dotnetcore/FreeSql.git
synced 2026-02-09 18:00:56 +08:00
TDengine增加完善CodeFirst功能
This commit is contained in:
@@ -192,16 +192,15 @@ namespace FreeSql.TDengine
|
||||
{
|
||||
sb.Append($"CREATE TABLE {subTableName}{Environment.NewLine}");
|
||||
sb.Append($"USING {superTableName} (");
|
||||
|
||||
var columnInfos = tb.ColumnsByPosition.Where(c =>
|
||||
c.Table.Properties[c.CsName].IsDefined(typeof(TDengineTagAttribute)));
|
||||
c.Table.Properties[c.CsName].IsDefined(typeof(TDengineTagAttribute))).ToArray();
|
||||
|
||||
var enumerable = columnInfos as ColumnInfo[] ?? columnInfos.ToArray();
|
||||
|
||||
var tagValues = new List<object>(enumerable.Count());
|
||||
var tagValues = new List<object>(columnInfos.Count());
|
||||
|
||||
var tableInstance = Activator.CreateInstance(tb.Type);
|
||||
|
||||
foreach (var columnInfo in enumerable)
|
||||
foreach (var columnInfo in columnInfos)
|
||||
{
|
||||
var tagValue = columnInfo.Table.Properties[columnInfo.CsName].GetValue(tableInstance);
|
||||
tagValues.Add(tagValue);
|
||||
|
||||
Reference in New Issue
Block a user