I have the following code:
var devices = from d in ctx.Devices.Include("DeviceGroups")
where d.DeviceEnabled == true
select d;
dlTerminals.DataSource = devices;
On the front end i do the following:
<asp:DataList ID="dlTerminals" runat="server" DataKeyField="DeviceId" GridLines="None" RepeatColumns="2" RepeatDirection="Horizontal" Width="100%">
<ItemTemplate>
<%# Eval("DeviceGroups.GroupName")%>
</ItemTemplate>
</asp:DataList>
But i get the following error:
does not contain a property with the name 'GroupName'.