标签:
这是一个方法,返回IList<AtAGlanceDetail>
public IList<AtAGlanceDetail> GetAtAGlanceReportByCondition(int? supplierId, string container, DateTime? ETA, string FOBPoint, string HBLNum, DateTime? motherVesselETD, string voyage) { var data = GetAll().Where(c => c.SupplierId == supplierId && c.Container == container && c.ETA == ETA && c.FOBPoint == FOBPoint && c.HBLNum == HBLNum && c.MotherVesselETD == motherVesselETD && c.Voyage == voyage).AsQueryable(); return data.ToList(); }
linq的 多条件拼接 是使用
dataSouce.Where(c => c.SupplierId == supplierId(条件参数) && c.Container == container && c.ETA == ETA ) //这种格式的写法
标签:
原文地址:http://www.cnblogs.com/dekevin/p/4235588.html