I'm working on an SPA which is using breeze for data access. I want to create an instance of metadata as soon as possible, and I suppose that would be after this has completed initialization:
var manager = new entityModel.EntityManager(serviceName);
However, entity manager needs to perform ajax request to web api controller to load metadata, and if I try manager.metadataStore.getEntityType("EntityName")
before it is complete, I get:
Uncaught Error: Unable to locate an 'Type' by the name
My question is is there an event which is triggered when metadata is loaded? I wandered through documentation but it seems that I'm unable to find it.