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
After you create the view using schemabinding you can add a primary key to it:
schemabinding
CREATE VIEW Colors WITH SCHEMABINDING AS SELECT Color='yellow', ColorCount=100 GO CREATE UNIQUE CLUSTERED INDEX PK_Colors ON Colors (Color)