嘗試在 LINQ 查詢中串連 int 和 string 類型的屬性時,遇到【Unable to cast the type 'System.Int32' to type 'System.Object'. LINQ to Entities only supports casting Entity Data Model primitive types】錯誤的解決方式

本文將介紹嘗試在 LINQ 查詢中串連 int 和 string 類型的屬性時,遇到【Unable to cast the type 'System.Int32' to type 'System.Object'. LINQ to Entities only supports casting Entity Data Model primitive types】錯誤的解決方式。

...繼續閱讀 »