标签:dem lines string present back com cursor mirror ble
二: 返回指定列匿名类集合
var data = db.Queryable<Student>()
.Select(f => new
{
f.ID,
f.Name
}).ToList();
/*
生成SQL:
SELECT [ID] AS [ID] , [Name] AS [Name] FROM [Student]
其它数据库类似, 不一一列举
*/
二: 返回指定列匿名类集合
var data = db.Queryable<Student>()
.Select(f => new
{
f.ID,
f.Name
}).ToList();
/*
生成SQL:
SELECT [ID] AS [ID] , [Name] AS [Name] FROM [Student]
其它数据库类似, 不一一列举
*/
三: 返回单个列集合
//返回值为List<string>
List<string> data = db.Queryable<Student>().Select(f => f.Name).ToList();
/*
生成SQL:
SELECT [Name] FROM [Student]
其它数据库类似, 不一一列举
*/
三: 返回单个列集合
//返回值为List<string>
List<string> data = db.Queryable<Student>().Select(f => f.Name).ToList();
/*
生成SQL:
SELECT [Name] FROM [Student]
其它数据库类似, 不一一列举
*/
SqlSugar 查询指定列 返回指定列 查特定的列节约资源加快速度
标签:dem lines string present back com cursor mirror ble
原文地址:https://www.cnblogs.com/tolingsoft/p/11774314.html