Friday, August 29, 2008

If you create an Entity Key on the fly:

dim ekey=New EntityKey("NWentities.Customer","customerID",1234)

then add it to an object

cust.EntityKey=ekey

and then try to Attach the object to a context

cust.EntityKey=ekey

and you get this error message

The member with identity 'NWentities does not exist in the metadata collection.
Parameter name: identity

It's telling you that you have NWentities improperly cased. In my model, it's really NWEntities.

If you get this error message,

The required entry ''customerID' was not found in the provided input. This entry is required by the key fields defined on type 'NWModel.Customer'

then the issue is that the  property name is cased incorrectly.

You can only guess how long it took me to figure that out. Hopefully this will help someone doing a google search in the future.

Friday, August 29, 2008 11:14:33 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
Wednesday, October 15, 2008 11:06:02 AM (Eastern Standard Time, UTC-05:00)
Most useful, Thanks!
Phil
All comments require the approval of the site owner before being displayed.
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Live Comment Preview