- 注册时间
- 2012-8-31
- 最后登录
- 2012-12-8
- 阅读权限
- 10
- 积分
- 54
- 精华
- 0
- 帖子
- 15
|
本帖最后由 Johny 于 2012-9-5 11:28 编辑
此种方法请求数据查询次数是不是太多了点?加重了服务端负担.
若此种情况在grid中数据该如何绑定,
{"total":20,"data":[{"id":1,"No":"0001","Name":"ab0001","Level":{"lId":1,"lName":"普通会员","lDesc":"普通会员"},{"id":2,"No":"0002","Name":"ab0002","Level":{"lId":2,"lName":"高级会员","lDesc":"高级会员"},|中间省略|,{"id":20,"No":"0020","Name":"ab0020","Level":{"lId":1,"lName":"普通会员","lDesc":"普通会员"}}]}
我用的是.NET Entity framework 可以直接生成此种数据预实现效果如图示
其实就是会员跟会员等级外键关联.
|
|