1.0.2 • Published 5 years ago

breeze-odata4-ms v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

A TypeScript library to enable querying an ASPNET Core OData 4 API using breezejs

Prerequisites

  • Breeze client npm package

Installation

  1. Install breeze-client

    $ npm install --save breeze-client
  2. Install breeze-odata4

    $ npm install --save breeze-odata4-tl

Usage

import { config, EntityManager } from "breeze-client";
import { OData4DataService, OData4UriBuilder } from 'breeze-odata4-tl';

OData4UriBuilder.register();
OData4DataService.register();
config.initializeAdapterInstance('uriBuilder', 'OData4', true);
config.initializeAdapterInstance('dataService', 'OData4', true);

const manager = new EntityManager('odata');
manager.fetchMetadata();

Now we can utilize breeze to query against an OData 4 API.

Typings

This library is currently referencing its own version of breeze-client typings, since the current typings available on DefinitelyTyped and within the breeze-client npm package are incomplete/outdated.

License

MIT © Travelogic