In WPF and SubSonic 2 using Active Record, I was able to bind to properties in rows from one table and easily follow the foreign key references (properties that returned the foreign key row representation) to bind to fields in the foreign key table. With SubSonic 3 and ActiveRecord, I'm not quite sure how to do this (easily) anymore. It looks like the foreign key references return IQueryable(Of T) which does not have a property to get the foreign key row. There is, however, are functions (First and Single) which accomplish what I would like.
For example, let's say I have an Employee table with a foreign key reference to a Department table, in SubSonic 2, I was able to do something like:
In code:
MyGrid.ItemsSource = New EmployeeCollection().Load()
In xaml:
<grid:DataGrid name="MyGrid">
<grid:DataGrid.Columns>
<grid:DataGridTextColumn Header="Employee" Binding="{Binding Path=EmployeeName}" />
<grid:DataGridTextColumn Header="Department" Binding="{Binding Path=Department.DepartmentName}" />
</grid:DataGrid.Columns>
</grid:DataGrid>
In SubSonic 3, I cannot figure out the equivalent to the binding to the DepartmentName, i.e.
Binding="{Binding Path=Department.DepartmentName}"
How do I accomplish the this in SubSonic 3? Thanks in advanced.