I am using an ADO.NET SqlCommand with a single SqlDbType.Structured parameter to send a table-valued parameter to a sproc. The sproc returns many rows, which I need to get into a strongly-Typed List of . What is the best way to convert the result set (whether DataTable from a DataAdapter or DataReader bits) into List?
Thanks.
The most efficient way is using datareader:
You can use LINQ with a DataReader:
i think you can use
Dapper
to convert a query to a class.for more information see my answer in this link