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