我的 DB 2 表中有:
文档(Document_Id,document_Name)
Person_Documents (person_ID ,Documet_Id document_Done)
我使用实体框架,我想用DataGrid
数据填充document_Name
,document_Done
我尝试了以下没有结果:
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;
请问,我哪里错了?在 xaml 我写这个
<DataGridTextColumn Binding="{Binding Path=Document_Name}" MinWidth="100" Header="document" />
<DataGridCheckBoxColumn Binding="{Binding Path=Document_done}" Header="Do" />