Linq中类型转换

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);

posted @ 2019-01-14 21:38  Elcser  阅读(522)  评论(0编辑  收藏  举报