For a new project, I first create my business classes and create real database tables later. Therefore, I use the constructor of Entity Framework 4. A new ADO.Net Entity Data model file is created with the extension .edmx.
I created two entities:

I want to add a 1 to nc relationship between Product -> Group. If I first created the MSSQL database, I would add an IDG column group to the table product and refer to Product.IDGroup on Group.IDGroup. As far as I can tell, I cannot add such an association to the constructor if I add a new IDGroup property to the product object
This is how I add the mapping: 
As a result:

Now about what this question consists of: if I add two tables from an existing MSSQL database to the edmx file, I get a compilation error:
Error 3027: No mapping specified for the following EntitySet/AssociationSet - GroupSet, ProductSet
What does this error mean and what should I do to fix it? If I delete these two tables, I will get a warning instead:
Error 2062: No mapping specified for instances of the EntitySet and AssociationSet in the EntityContainer myContainer.
Something tells me, I'm doing it all wrong, and it's just basic stuff. How can I do it right?
citronas Sep 13 '10 at 13:04 on 2010-09-13 13:04
source share