my datatable has few ticker name those are string type. now see how i am fetching data
List<PocoTicker> _ticker = new List<PocoTicker>();
string query = "SELECT [Ticker] FROM [dbo].[tbltest]";
DataSet ds = SqlHelper.ExecuteDataset(conn,CommandType.Text, query);
if (ds.Tables.Count > 0)
{
var table = ds.Tables[0];
_ticker = table.AsEnumerable().Select(row => new { Ticker = row.Field<string>("Ticker") }).ToList();
}see my code which is not compiling. i want to retrieve data from datatable using linq and store as list which i will bind later to combobox
tell me how to achieve this.
thanks