Friday, May 9, 2014

Allow edmx 4.0 to get view without primary key

Following snippet is to forcefully allow view which do not have any primary key in edmx4.0.

SELECT
  ISNULL(MyPrimaryID,-999) MyPrimaryID,
  NULLIF(AnotherProperty,'') AnotherProperty
  FROM ( ... ) AS temp

ref: http://stackoverflow.com/questions/1013333/entity-framework-and-sql-server-view

No comments:

Post a Comment