时间:2021-07-01 10:21:17 帮助过:4人阅读
3var data = db.Queryable<Student>()
4 .Select(f => new
5 {
6 f.ID,
7 f.Name
8 }).ToList();
9/*
10生成SQL:
11SELECT [ID] AS [ID] , [Name] AS [Name] FROM [Student]
12其它数据库类似, 不一一列举
13*/
三: 返回单个列集合
//返回值为List<string>
List<string> data = db.Queryable<Student>().Select(f => f.Name).ToList();
/*
生成SQL:
SELECT [Name] FROM [Student]
其它数据库类似, 不一一列举
*/
1三: 返回单个列集合
2
3//返回值为List<string>
4List<string> data = db.Queryable<Student>().Select(f => f.Name).ToList();
5/*
6生成SQL:
7SELECT [Name] FROM [Student]
8其它数据库类似, 不一一列举
9*/
SqlSugar 查询指定列 返回指定列 查特定的列节约资源加快速度
标签:dem lines string present back com cursor mirror ble