Breeze.js - 如果我使用.Include,查询失败

时间:2013-03-13 10:13:31

标签: entity-framework breeze

我在ViewModel中有以下javascript:

 manager.executeQuery(query)
            .then(function (projects) {
                projects.results.forEach(function (item) {
                    if (item.IsFavorite() == true) {
                        self.favoriten.push(item);
                    }
                    else {
                        self.zuletzt.push(item);
                    }                        
                });
                console.log("Query favorite finished");
            })
            .fail(function (error) {
                console.log("Query failed: " + error.message);
            });

控制器:

var res = _contextProvider.Context.Projects
            .Include("User11")
            .Include("User12")
            .Include("Timestamps")
            .Where(p => p.Finished == false)
            .Where(p => p.User12.Any(u => u.Guid == ID));

var erg = res.OrderByDescending(r => r.Timestamps.Min(t => t.Start));

return erg;

我收到错误:查询失败:+大量数据 如果删除三个Include语句,查询工作,但odrderBy不起作用。

有解决方案吗?

0 个答案:

没有答案