I'm adding a very simple view (or trying to) to my entities object model. The database is in sql server 2008. I'm on .net 3.5 (sp1) using C#.
The view has two fields: color and colorcount, a Varchar(50) and a count(*) respectively.
When I do Update Model from Database, and select the view to add, it runs (it updated tables, adding fields no problem) but does not add the view. No error, warnings, or messages are displayed.
When I open the .edmx file I see that it shows Warning 6013: No primary key defined.
The view is complex and I would rather not translate it to a LINQ query. How can I add a primary key so that Entities will support the view?
Is there a non-hack-around way to add a view like this to an EDMX?