我有一个数据DataReader,我希望将其转换为List<T>.对此有什么简单的解决方案?
DataReader
List<T>
例如,在CustomerEntity类中,我有CustomerId和CustomerName属性.如果我的DataReader将这两列作为数据返回,那么我该如何将其转换为List<CustomerEntity>.
List<CustomerEntity>
c# datareader generic-list
c# ×1
datareader ×1
generic-list ×1