How do I transform a List into a DataSet?

前端 未结 5 666
故里飘歌
故里飘歌 2020-12-02 13:00

Given a list of objects, I am needing to transform it into a dataset where each item in the list is represented by a row and each property is a column in the row. This DataS

5条回答
  •  南方客
    南方客 (楼主)
    2020-12-02 13:21

    I've written a small library myself to accomplish this task. It uses reflection only for the first time an object type is to be translated to a datatable. It emits a method that will do all the work translating an object type.

    Its blazing fast. You can find it here: ModelShredder on GoogleCode

提交回复
热议问题