Skip to content

EntitySet

Diego van Haaster edited this page Mar 4, 2022 · 4 revisions
let airportsResource = this.airportsService.entities();

entity

let airportResource = airportsResource.entity('ARD');

action

let actionResource = airportsResource.action('Default.Action');

function

let functionResource = airportsResource.function('Default.Function');

count

let countResource = airportsResource.count();

cast

let castResource = airportsResource.cast('Type');

create

airportsResource.create(airport).subscribe();

fetch

airportsResource.fetch().subscribe(({ entities, annots }) => {
  console.log('Airports: ', entities);
  console.log('Annotations: ', annots);
});

fetchEntities

airportsResource.fetchEntities().subscribe((airports) => {
  console.log('Airports: ', airports);
});

fetchCollection

airportsResource.fetchCollection().subscribe((col) => {
  console.log('Airports: ', col.models());
});

fetchAll

airportsResource.fetchAll().subscribe((airports) => {
  console.log('Airports: ', airports);
});
Clone this wiki locally