public List<user> GetList(String MatchTypeName) { var result = new List<dynamic>(); using (SqlConnection conn = new SqlConnection(@"Server= server_name; Uid=xyz;pwd=pass; database=db_name")) { try { #region commented conn.Open(); SqlCommand dCmd = new SqlCommand("SP_WEBBASEDREPorTS", conn); dCmd.CommandType = CommandType.StoredProcedure; dCmd.Parameters.Add(new SqlParameter("@MatchType", MatchTypeName)); dCmd.Parameters.Add(new SqlParameter("@ModeFlag", "Batting Industry Average")); SqlDataAdapter da = new SqlDataAdapter(dCmd); DataSet ds = new DataSet(); DataTable table = new DataTable(); ds.Clear(); da.Fill(table); conn.Close(); foreach (DataRow row in table.Rows) { var obj = (IDictionary<string,>)new ExpandoObject(); foreach (DataColumn col in table.Columns) { obj.Add(col.ColumnName, row[col.ColumnName]); } result.Add(obj); } return result; } catch { } } return result; }
cannot implicitly convert type 'system.collections.generic.list<dynamic> to system.collection.generic.list</dynamic>
List<user>
List<dynamic>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)