Browse Source

Update Datatableextensions

pull/14/MERGE
sunkaixuan 3 years ago
parent
commit
005d7075ae
  1. 2
      Src/Asp.Net/SqlSugar/Utilities/DataTableExtensions.cs

2
Src/Asp.Net/SqlSugar/Utilities/DataTableExtensions.cs

@ -86,7 +86,7 @@ namespace SqlSugar
if (rowSelector.Body is MemberExpression)
rowName = ((MemberExpression)rowSelector.Body).Member.Name;
else
rowName = string.Join(UtilConstants.ReplaceKey, ((NewExpression)rowSelector.Body).Arguments.Select(it => it as MemberExpression).Select(it => it.Member.Name));
rowName = "Group_"+string.Join("_", ((NewExpression)rowSelector.Body).Arguments.Select(it => it as MemberExpression).Select(it => it.Member.Name));
var columns = source.Select(columnSelector).Distinct();
cols = (new[] { rowName }).Concat(columns.Select(x => x.ToString())).ToList();

Loading…
Cancel
Save