I\'m getting started with OData and Entity Framework.
I created a Controller that exposes Customer. In the model (edmx) there\'s only one Entity (Customer) and ever
I assume the model builder is not able to figure out the key property for the entity type Order. You can help out the model builder through a couple of ways,
builder.EntitySet
. This adds a new entityset 'orders' and also has the effect of marking the type 'Order' as an entity type. You also have to specify the key property of 'Order'.
Mark the key property(or properties) on the type 'Order' with the [Key]
attribute.
If you hate attributes and prefer doing it in code, you can do, builder.EntitySet