-2

I have installed Breeze sharp package and i have created one sample windows application that has a model Customer.

I have created the EntityManager for our API service and try to fetch the metadata to create my entities,but its throwing following error

There are no KeyProperties yet defined on EntityType: 'Customer:#BSharp.Models'. Please insure that the metadata for this type is complete either by calling FetchMetadata or by explicitly updating the KeyProperties before creating an EntityKey for this type

Can you help me solving this problem?

1 Answers1

0

It's complaining that none of the properties in your Customer entity are marked as the key. Can you post the definition of your Customer entity? What are you using as your backend? Entity Framework?

superswiss
  • 211
  • 1
  • 4
  • Thanks for your reply.We are using the entity framework.Here we created the proxymodel for breeze client and added the [Key] attribute for primary key in that model. First we are called entityManager.FetchMetadata() after that we are calling addEntity but its throwing this error while call the addEntity. There are no KeyProperties yet defined on EntityType: 'Model'. Please insure that the metadata for this type is complete either by calling FetchMetadata or by explicitly updating the KeyProperties before creating an EntityKey for this type. – Vijayakumar K Jul 14 '15 at 12:21
  • What are you using as a key? Database generated or Guids? Can you inspect the EntityType in the MetadataStore and look at what it thinks its properties and keys are? – superswiss Jul 15 '15 at 16:30