public List <T> GenerateList <T>(List <Dictionary <string, object> > lstResults) { var LstCompanies = new List <T>(); if (lstResults.Count > 0) { var Objs = Mapper.BuildObjects(lstResults); foreach (var c in Objs) { LstCompanies.Add((T)Convert.ChangeType(c, typeof(T))); } } return(LstCompanies); }