本文整理汇总了C#中Entities.List.OrderByDescending方法的典型用法代码示例。如果您正苦于以下问题:C# List.OrderByDescending方法的具体用法?C# List.OrderByDescending怎么用?C# List.OrderByDescending使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Entities.List
的用法示例。
在下文中一共展示了List.OrderByDescending方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetAssignedBinsList
public IList<ZoneBinRelation> GetAssignedBinsList(Product product, Location location)
{
IList<ZoneBinRelation> result = new List<ZoneBinRelation>();
if (product == null || location == null)
return result;
//if ( product.ProductZones == null || product.ProductZones.Count == 0)
// return result;
IList<ZoneEntityRelation> tmpZoneEntity = Factory.DaoZoneEntityRelation().Select(
new ZoneEntityRelation { Entity = new ClassEntity { ClassEntityID = EntityID.Product },
EntityRowID = product.ProductID }
);
if (tmpZoneEntity == null || tmpZoneEntity.Count == 0)
return result;
IList<ZoneBinRelation> tmpZoneBin;
foreach (ZoneEntityRelation ze in tmpZoneEntity)
{
/*
if (ze.Zone.Bins == null || ze.Zone.Bins.Count == 0)
continue;
foreach (ZoneBinRelation b in ze.Zone.Bins.Where(f => f.Zone.Location.LocationID == location.LocationID))
result.Add(b);
*/
tmpZoneBin = Factory.DaoZoneBinRelation().Select(new ZoneBinRelation { Zone = ze.Zone });
if (tmpZoneBin == null || tmpZoneBin.Count == 0)
continue;
foreach (ZoneBinRelation b in tmpZoneBin.Where(f=> f.Zone.Location.LocationID == location.LocationID))
result.Add(b);
}
return result.OrderByDescending(f=>f.BinType).ToList();
}