FineUI 官方论坛
标题:
AppBox3.0 - 关联表查询(Entity Framework)排序报错-online
[打印本页]
作者:
scottlin
时间:
2013-10-28 15:42
标题:
AppBox3.0 - 关联表查询(Entity Framework)排序报错-online
online.aspx.cs
private void BindGrid()
{
IQueryable<Online> q = DB.Onlines.Include(o => o.User);
q = SortAndPage<Online>(q, Grid1);
Grid1.DataSource = q;
Grid1.DataBind();
}
online.aspx
<Columns>
<x:BoundField DataField="UpdateTime" SortField="UpdateTime" DataFormatString="{0:yyyy-MM-dd HH:mm}"
Width="120px" HeaderText="最后操作时间" />
<x:BoundField DataField="LoginTime" SortField="LoginTime" Width="120px" DataFormatString="{0:yyyy-MM-dd HH:mm}"
HeaderText="登录时间" />
<x:BoundField
DataField="User.Name" SortField="User.Name"
Width="100px" HeaderText="用户名" />
<x:BoundField
DataField="User.ChineseName" SortField="User.ChineseName"
Width="100px" HeaderText="中文名" />
<x:BoundField DataField="IPAdddress" ExpandUnusedSpace="true" HeaderText="IP地址" />
<x:WindowField Text="查看" Title="查看" WindowID="Window1" DataIFrameUrlFields="User.ID"
DataIFrameUrlFormatString="~/admin/user_view.aspx?id={0}" Width="50px" />
</Columns>
报错
Instance property 'User.Name' is not defined for type 'AppBox.Online'
刚开始学习Entity Framework和使用AppBox ,哪位老大来分析下这个问题的解决思路啊。不胜感激。
作者:
☆☆αβ☆☆
时间:
2013-10-28 16:28
看这里
http://fineui.com/bbs/forum.php? ... &extra=page%3D2
欢迎光临 FineUI 官方论坛 (https://fineui.com/bbs/)
Powered by Discuz! X3.4