0
votes

Im trying to create a very basic Todo-entity from the Breeze example.. Im doing:

manager.createEntity("Todo",{Description:"Test",Id:32,IsDone:false});

But I keep getting an error where the console tells me that it couldnt find the Type "Todo".. I have tried all types I can possibly think of.. Could anyone please provide me with an example of how to create an entity for the breeze WebApiSample.. cause this is driving me nuts..

Thanks alot!

1

1 Answers

0
votes

Breeze needs metadata in order to create an entity of any type. That metadata can either be returned from the server or created locally. My guess is that you haven't yet done either of these. Metadata from the server is usually automatically fetched by Breeze during its first query against the server. Alternatively you can cause it to be fetched directly via the MetadataStore.fetchMetadata method.

Hope this helps.