【发布时间】:2014-03-31 00:20:43
【问题描述】:
我正在使用 jaydata、OData 和 web api 开发一个应用程序。源码如下:
$(document).ready(function () {
$data.Entity.extend('$org.types.Student', {
Name: { type: 'Edm.String', nullable: false, required: true, maxLength: 40 },
Id: { key: true, type: 'Edm.Int32', nullable: false, computed: false, required: true },
Gender: { type: 'Edm.String', nullable: false, required: true, maxLength: 40 },
Age: { type: 'Edm.Int32', nullable: false, required: true, maxLength: 40 }
});
$data.EntityContext.extend("$org.types.OrgContext", {
Students: { type: $data.EntitySet, elementType: $org.types.Student },
});
var context = new $org.types.OrgContext({ name: 'OData', oDataServiceHost: '/api/students' });
context.onReady(function () {
console.log('context initialized.');
});
});
在上面的 JavaScript 代码中,我定义了一个名为 Student 的实体。在context.onReady() 方法中,我收到以下错误:
Provider fallback failed! jaydata.min.js:100
任何想法,我怎样才能摆脱这个错误??
【问题讨论】:
标签: asp.net-mvc asp.net-web-api odata jaydata