C# Convert DataTable to List generic collection
C# snippet below helps to read SQL data to List<T> generic collection without any extensions or frameworks only with SQL and LINQ.
SqlDataSource sdc = SomeFunctionToGetSqlData(string param);
DataSourceSelectArguments args = new DataSourceSelectArguments();
DataView dv = sdc.Select(args) as DataView;
DataTable dt = dv.ToTable() as DataTable;
List<SalaryInfo> allpays = new List<SalaryInfo>();
allpays = (from DataRow row in dt.Rows
select new SalaryInfo
{
description = row["description"].ToString(),
sum = Convert.ToDecimal(row["sum"].ToString()),
type = row["type"].ToString()
}).ToList();
Net 10.0 is not available for Azure Functions. How to fix
Custom Label with multiple styles in TextField of Fluent UI
First impressions after using the new SPFX 1.22.2 with Heft