hung-doan / .bookmarks

My life bookmarker
0 stars 0 forks source link

Entity Framework returns wrong data for view #4

Closed hung-doan closed 8 years ago

hung-doan commented 8 years ago

Type: Impediment Descriptions: Reason: Entity framework get data by PK so if we set up wrong PK, then final result is wrong also.

Solutions: The solution is to explicitly define columns you want for PK in SQL server as non-nullable using ISNULL function

Ref: [0] Entity Framework returns wrong data for view with LEFT JOIN statement