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博客

相关推荐
Yogurt_cry5 小时前
[树莓派4B] 闲置近10年的爱普生 L310 打印机爆改无线打印机
linux·物联网·树莓派
爱吃橘子橙子柚子1 天前
3CPU性能排查总结(超详细)【Linux性能优化】
运维·cpu
Johny_Zhao1 天前
OpenClaw中级到高级教程
linux·人工智能·信息安全·kubernetes·云计算·yum源·系统运维·openclaw
Sheffield2 天前
Docker的跨主机服务与其对应的优缺点
linux·网络协议·docker
Sheffield2 天前
Alpine是什么,为什么是Docker首选?
linux·docker·容器
舒一笑3 天前
程序员效率神器:一文掌握 tmux(服务器开发必备工具)
运维·后端·程序员
Johny_Zhao3 天前
centos7安装部署openclaw
linux·人工智能·信息安全·云计算·yum源·系统运维·openclaw
haibindev3 天前
在 Windows+WSL2 上部署 OpenClaw AI员工的实践与踩坑
linux·wsl2·openclaw
NineData3 天前
数据库管理工具NineData,一年进化成为数万+开发者的首选数据库工具?
运维·数据结构·数据库