和微风一起玩。这是一个代码:
var dataService = new breeze.DataService({
serviceName: "/api/articles",
hasServerMetadata: false
});
var ms = new breeze.MetadataStore();
var manager = new breeze.EntityManager({
dataService: dataService,
metadataStore: ms
});
var query = new breeze.EntityQuery().from("Query");
manager.executeQuery(query).then(function (data) {
// this fails
var articles = manager.executeQueryLocally(query);
console.log(articles);
}).fail(function(e) {
alert(e);
});
没有行var 文章 = manager.executeQueryLocally(query); 一切都好。它说“实体类型为空”。我想我需要添加实体类型但不确定如何添加?