var BusDebts = db1.BusDebts.Where(s => s.BusOpt >= dts && s.BusOpt < dte && s.AreaName.Contains(AreaName) && s.FarmerName.Contains(FarmerName) && s.DebtType.Contains(DebtType) && System.Data.Objects.SqlClient.SqlFunctions.StringConvert((decimal)s.ID).Contains(ID)).OrderByDescending(s => s.BusOpt);
转载于:https://www.cnblogs.com/Elcser/p/10269195.html