I have following code snippet into c#
public class Client
{
public string ID { get; set; }
public string Name { get; set; }
public string Address { get; set; }
}
var liste = new List<Dictionary<string, string>>();
var dictionary = new Dictionary<string, string>();
dictionary["Id"] = "111";
dictionary["Name"] = "XYZ";
dictionary["Address"] = "Addd";
liste.Add(dictionary);
var result = liste.SelectMany(x => x);
//Code for Converting result into List<Client>
Now I want to create List from the result query using linq
Well, you could do something like:
Is that what you were thinking of? You could make it more general-purpose by iterating over the dictionary and setting properties with reflection… but it would become significantly longer code, of course.