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

相关推荐
电商API_180079052473 小时前
京东商品详情API技术文章
大数据·运维·人工智能·网络爬虫
三言老师3 小时前
秘诀-如何远程SSN访问家里的八台电脑(frp 实操方案)
linux·运维·ssh
王维同学5 小时前
进程模块枚举、映像身份与线程启动地址关联
c++·windows·安全
举手5 小时前
Dispatcher模块剖析
linux·c++
BTU_YC5 小时前
Docker Compose 部署 DozerDB 完整教程
运维·docker·容器
allforgood6 小时前
运行容器
linux
Light_It7 小时前
Linux 内核参数 pci-stub.ids=
linux·kernel
RisunJan8 小时前
Linux命令-scriptreplay(终端会话回放)
linux·运维·chrome
spencer_tseng8 小时前
[kylin & linux] install docker
linux·docker·kylin
x²+(y-√³x²)²=19 小时前
Linux打包文件到Windows,文件/文件类型丢失
linux·运维·windows