Hi guys,
I think i'm missing the point somewhere along the line when it comes to entity framework but i'm convinced I should be able to to do this.
I've got two related tables, for the sake of argument lets call them person(personid, surname) and persontype(persontypeid, name). Person must have a persontype and a persontype can be assigned to zero or more person records.
So I create the data model from my database and it sows up the correct linkage. I copy the persontype.name property into person and setup the mapping details so that person maps to persontype and the name property originates from persontype.name. Seems simple enough..
It won't compile now though, even if I remove the persontype entity from my page. The error I get is "Error 3024: Problem in mapping fragment.. Must specify mapping for all key properties (Person.PersonID, Person.PersonTypeID) of the EntitySet Person
I'm at a loss as to where to go now, if I cant solve this issue i'm struggling to see the benefit in using Entity Framework over LINQ to SQL.
Thanks,
Matt
-----------
Matt Brooke
Software & System Developer
http://www.rocketscience.uk.com
http://www.i-snapshot.com