c#通过sqlsugar查询信息并日期排序

c#通过sqlsugar查询信息并日期字段排序

复制代码
public static List<Sugar_Get_Info_Class> Get_xml_lot_xx(string lot_number)
        {
            DBContext<Sugar_Get_Info_Class> db_data = DBContext<Sugar_Get_Info_Class>.OpDB();
            Expression<Func<Sugar_Get_Info_Class, bool>> cd = null;
           
            var list = db_data.Db.Queryable<Sugar_Get_Info_Class>().Where(f => f.lot == lot_number).OrderBy(f => f.exec_date, SqlSugar.OrderByType.Asc).ToList();
            return list;
            
        }

参考相关配置方法:

SqlSugar库操作mysql数据库方法-增删改查_sqlsugar 批量更新-CSDN博客

相关推荐
SelectDB18 小时前
Litefuse 开源并推出单进程轻量模式,25 秒就能跑起来的 Agent 可观测与评估平台
运维·后端·自动化运维
AlfredZhao18 小时前
Docker 容器时区不对,`timedatectl` 不存在怎么办?
linux·timezone
zzzzzz3102 天前
9K Star 炸裂开源!这个 C 语言写的代码知识图谱,把 Linux 内核索引压缩到了 3 分钟
linux·服务器·sql
XIAOHEZIcode2 天前
Linux系统鼠标偏移常见原因以及修复方案
linux·运维·游戏
用户0328472220703 天前
如何搭建本地yum源(上)
运维
A小辣椒4 天前
TShark:Wireshark CLI 功能
linux
A小辣椒4 天前
TShark:基础知识
linux
AlfredZhao4 天前
OCI 明明分配了 200G 系统盘,为什么 df 只看到 30G?
linux·oci
AlfredZhao5 天前
vi 删除指定范围的行,不用再反复按 dd
linux·vi
用户9718356334665 天前
银河麒麟 KY10 申威(SW64) 安装 nginx-1.16.1-2.p01.ky10.sw_64.rpm 详细步骤
linux