@furystack/odata
v2.1.23
Published
ODATA Rest Endpoint implementation for FuryStack
Downloads
68
Readme
@furystack/odata
odata v4 implementation for FuryStack. This package is in an early and experimental state. More info coming soon...
Usage example
You can use OData in a similar way:
class MyEntityType {
public id!: number
public value!: string
}
const myInjector = new Injector()
myInjector
.useLogging()
.useHttpApi()
.useOdata('odata.svc', model =>
model.addNameSpace('default', namespace =>
namespace
.setupEntities(e =>
e.addEntityType({
model: MyEntityType,
primaryKey: 'id',
properties: [{ property: 'id', type: EdmType.Int16 }, { property: 'value', type: EdmType.String }],
}),
)
.setupCollections(collections => collections.addCollection({ model: MyEntityType, name: 'MyEntities' })),
),
)
.listenHttp()