LINQ to SQL - How to select specific columns and return strongly typed list

前端 未结 3 1197
不思量自难忘°
不思量自难忘° 2020-12-08 02:10

I\'m trying to use LINQ to SQL to select a few specific columns from a table and return the result as a strongly typed list of objects.

For Example:



        
3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-08 02:35

    The issue was in fact that one of the properties was a relation to another table. I changed my LINQ query so that it could get the same data from a different method without needing to load the entire table.

    Thank you all for your help!

提交回复
热议问题