How to do Select All(*) in linq to sql

前端 未结 9 1765
傲寒
傲寒 2020-12-13 01:12

How do you select all rows when doing linq to sql?

Select * From TableA

In both query syntax and method syntax please.

9条回答
  •  南方客
    南方客 (楼主)
    2020-12-13 02:06

    I often need to retrieve 'all' columns, except a few. so Select(x => x) does not work for me.

    LINQPad's editor can auto-expand * to all columns.

    after select '* all', LINQPad expands *, then I can remove not-needed columns.

提交回复
热议问题