views:

45

answers:

0

I'm using AdventureWorks database and created a ADO.NET Entity file (*.edmx) and I selected all tables. Now I created a custom entity named SalesOrder and I created some scalar properties in that entity names OrderID,OrderDate,CustomerID,CustomerType and I tried to map the OrderID,OrderDate,CustomerID with SalesOrderHeader respective fields and mapped CustomerType with Customer entity CustomerType. I obviously matched all the datatypes. Now when I build the project its giving me an error -

Error 1 Error 3024: Problem in Mapping Fragment starting at line 6173: Must specify mapping for all key properties (SalesOrderSet.OrderID) of the EntitySet SalesOrderSet. D:\HERCULES SOURCECODE\Web.Hercules\Web.Hercules\Models\AdventureWorks.edmx 6174 15 Web.Hercules

What am I doing wrong here. Please help.