I have in my DB 2 tables:
-
Documents (Document_Id ,document_Name)
-
Person_Documents (person_ID ,Documet_Id document_Done)
I use entity framework and ,and I want to fill DataGrid with the data document_Name and document_Done,
I have tried the following with no results:
vagEntities projectE = new vagEntities();
var doc = from c in projectE.Person_Documents
join cw in projectE.Documents on c.Document_Id equals cw.Document_Id
where c.Person_Id == 150
select c;
DocGrid.ItemsSource = doc;
Please, where am I wrong?
un the xaml i write this
<DataGridTextColumn Binding="{Binding Path=Document_Name}" MinWidth="100" Header="document" />
<DataGridCheckBoxColumn Binding="{Binding Path=Document_done}" Header="Do" />
I think you are looking to project your result to an anonymous type like this:
Update – project to concrete class