I'm working in asp.net web forms 4.5 version.
I have trouble with linq. I want to bring a table data.. (I don't want to join it.. as I would want it to be deleted and edited by the autodelete and autoedit button of gridview)
But I'm lost with linq.
I would like to do something like this..
public Iqueryable detailGrid_getData(){
string fromDStr = fromTBox.Text;
DateTime fromD = Convert.ToDateTime(fromDStr);
string toDStr = toTBox.Text;
DateTime toD = Convert.ToDateTime(toDStr);
var items = from s in db.salesOrderDetail_T where
db.salesOrder_T
.Select(so => so.poDate <= toD && so.poDate >=fromD)
.Contatins(s.soIdx) && s.stat == stat;
return items;
}
at which I got the idea from here : LINQ, select ID from Table where it does not match ID in another table
but for some reason, it doesn't work. Will someone tell me why this is not working??
edit : It says a query body must end with a select clause or a group clause