Using the EDM designer

J

Justin Dutoit

Hi. Please help- this is a question on the ADO.NET Entity Framework and its
EDM designer in Visual Web Developer Express (for the .edmx file). I have a
shopping application with a shopping trolley, with the following information
showed to the user:
Brand, Productname, NumberOfUnitsInTrolley
Before the Entity Framework came along, in my relational db, this used to be
achieved by (in the Purchases table):
Fields Productnumber (FK), NumberOfUnitsInTrolley.
Brand and Productname came from the Products table using the FK.

I want to create an Entity called BasketItems in the VWD EDM designer view
to represent a trolley. I've mapped Brand and Productname to the Products
table, and NumberOfUnitsInTrolley to Purchases. The problem seems to be with
the Key field of the BasketItems Entity. It tells me that Property
'BasketItemsNumber' (the Key field) is not mapped (what should it map to?
When I tried mapping it to the Purchases table PK I got the error 'Must
specify mapping for all key properties'). I could use some info on how the
designer works- please explain what I should do, the more info, the
better...

Thanks
Justin Dutoit
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top