This LINQ expression is not working:
dt.AsEnumerable().ToDictionary<Int64, List<string>> (
dtRow => dtRow.Field<Int64>("CodeVal_1"),
new List<string> {
dtRow => dtRow.Field<string>("CodeVal_2"),
dtRow => dtRow.Field<string>("CountryCode")
}
);
dt is a DataTable, and I added a reference to DataSetExtensions.
Here full code
using (DataSet dsIps = DbConnection.db_Select_Query("use mydb select * from tblCountryCodes"))
{
using (DataTable dt = dsIps.Tables[0])
{
dt.AsEnumerable().ToDictionary<Int64, List<string>>(
dtRow => dtRow.Field<Int64>("CodeVal_1"),
new List<string> {
dtRow => dtRow.Field<string>("CodeVal_2"),
dtRow => dtRow.Field<string>("CountryCode")
}
);
}
}
errors list 
Based on the additional information, the problem is that you are not passing the right arguments to
ToDictionary. It takes two lambdas, not a lambda and aList<>.Here’s the first step to fixed code:
EDIT: fixed using wrong version of
ToDictionary.