Closed erisonliang closed 1 year ago
@erisonliang Want to send a PR?
@erisonliang Want to send a PR?
Yes. Please.
I was looking for this feature too. Was the PR send/merged yet?
No, there is no PR for this feature.
Ok, just submitted one.
Implemented in #73. Thanks @mikeTWC1984
Please add the followings to fix the issue. Thank you so much. (ref: https://github.com/mgravell/fast-member/blob/e7423b71d98fc0dd1d3a6eebf425fd987d5da56e/FastMember/ObjectReader.cs#L111)
public override DataTable GetSchemaTable() { // these are the columns used by DataTable load DataTable table = new DataTable { Columns = { {"ColumnOrdinal", typeof(int)}, {"ColumnName", typeof(string)}, {"DataType", typeof(Type)}, {"ColumnSize", typeof(int)}, {"AllowDBNull", typeof(bool)} } }; object[] rowData = new object[5]; for (int i = 0; i < FieldCount; i++) { rowData[0] = i; rowData[1] = GetName(i); rowData[2] = GetFieldType(i); rowData[3] = -1; rowData[4] = true; table.Rows.Add(rowData); } return table; }