Guys Plz give me any ideas .
WPF App to bind a data table from a linq query given below code
Entityfm db = new Entityfm();
var qry = db.TableName.ToList();
datagrid.ItemsSource = qry;
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Khaja MoizuddinPosted Dec 13, 2016, 12:21 PM
Amit Kumar SinghPosted Dec 13, 2016, 9:36 PM
dataGrid1.ItemsSource = from myRow in ds.Tables[0].Rows.CastDataRow >()
where (int)myRow["ID"] < 10
select new Person
{
Age = (int)myRow["ID"],
Name = myRow["Name"] as string
};