Skip to content

Commit

Permalink
tiny more work
Browse files Browse the repository at this point in the history
  • Loading branch information
Nixill committed Aug 23, 2024
1 parent 8147628 commit a93c035
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CSharp.Nixill/src/Grid/DataTableParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using Nixill.Utils;

namespace Nixill.Collections.Grid.CSV;
Expand Down Expand Up @@ -54,6 +55,15 @@ public static DataTable EnumerableToDataTable(IEnumerable<char> input,
types.Add(typeof(string));
}
}

if (primaryKey != null)
table.PrimaryKey = primaryKey.Select(x => table.Columns[x]).ToArray();

isHeaderRow = false;
}
else
{

}
}
}
Expand Down

0 comments on commit a93c035

Please sign in to comment.