Relative Content

Tag Archive for c#asp.net-coreasynchronous.net-8.0

Asynchronously generate and add POCO to List

I’m executing a query that returns approximately 11,000 rows. Each one of these rows is mapped to a unique POCO that I wrote a lightweight ORM to handle creating, called ToCustomObject<T>. Right now, I have an already async method that gets the results of this query and puts them into a DataTable. I then loop through all of the rows and call ToCustomObject on them to generate my object, and then add it to a List<T>. The query itself only takes half a second, but the loop to generate all my POCOs takes multiple seconds.