WSMDataClassesDataContext wsrdTable = new WSMDataClassesDataContext(); string SelectedParameter = DropDownListParameters.SelectedValue; var DataFromWSRD = from wsm in wsrdTable.WeatherStationReportDetails where wsm.DateTime >= Date1 && wsm.DateTime <= Date2 select wsm; List<object> SelectedParam = new List<object>(); foreach (var temp in DataFromWSRD) { SelectedParam.Add("here should be selected the column that I have its name"); }
WSMDataClassesDataContext wsrdTable = new WSMDataClassesDataContext(); string SelectedParameter = DropDownListParameters.SelectedValue; var DataFromWSRD = from wsm in wsrdTable.WeatherStationReportDetails where wsm.DateTime >= Date1 && wsm.DateTime <= Date2 select new{ "here I want to choose the column that I have its name as string" };
MyDatabaseEntities context = new MyDatabaseEntities(); string singleString = context.MyTable.FirstOrDefaut(/*Lambda Expression to select a specific row*/).MyColumnName; List<string> stringList = context.MyTable.Select(/*Lambda Expression to select what column you want*/).ToList(); </string>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)