I have a simple table named ZipCodes that contains ZipCode, City and State. I create a new class library project, add an ADO.NET Entity Data Model to the project, Select the ZipCodes table from the database, pick the connection string, check the box next to the ZipCodes table and click "Finish" and it generates the edmx and Designer.cs files... but no ZipCodes. The table definition is not on the designer screen and it is not in the .cs file. How can this be?
Burried in the edmx file is a comment:
Errors Found During Generation: warning 6013: The table/view 'Common.dbo.ZipCodes' does not have a primary key defined and no valid primary key could be inferred. This table/view has been excluded. To use the entity, you will need to review your schema, add the correct keys, and uncomment it.