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;
}
参考相关配置方法: