No Primary Key Defined adding a View to Entity Framework

The solution (if you want to call it that) to fix the issue "does not have primary key defined" when adding views to Entity Framework was posted on this link at StackOverflow. These annoyances in EF are having me look at nHibernate. 
 
SELECT
  ISNULL(MyPrimaryID,-999) MyPrimaryID,
  NULLIF(AnotherProperty,'') AnotherProperty
  FROM ( ... ) AS temp