public Expression <Func <ItemEntity, bool> > GetItemExp(BrandEnum brand, FlavorEnum flavor, PackageEnum package, ProductionType productionType, ProductionDetail productionDetailType) { Expression <Func <ItemEntity, bool> > itemWhere = c => true; if (brand != BrandEnum.Null) { var prefix = itemWhere.Compile(); itemWhere = c => prefix(c) && c.Brand == (int)brand; } if (flavor != FlavorEnum.Null) { var prefix = itemWhere.Compile(); itemWhere = c => prefix(c) && c.Flavor == (int)flavor; } if (package != PackageEnum.Null) { var prefix = itemWhere.Compile(); itemWhere = c => prefix(c) && c.Package == (int)package; } if (productionType != ProductionType.Null) { var prefix = itemWhere.Compile(); itemWhere = c => prefix(c) && c.ProductionType == (int)productionType; } if (productionDetailType != ProductionDetail.Null) { var prefix = itemWhere.Compile(); itemWhere = c => prefix(c) && c.ProductionDetailType == (int)productionDetailType; } return(itemWhere); }
public Bike(string name, BrandEnum bikeBrand, Groupset bikeGroupset, BikeType bikeType, bool discBrakes, decimal price) { Name = name; BikeBrand = bikeBrand; BikeGroupset = bikeGroupset; BikeType = bikeType; DiscBrakes = discBrakes; Price = price; }
/// <summary> /// Initializes a new instance of the <see cref="ChinaDomesticPaymentMethodAllOf" /> class. /// </summary> /// <param name="chinaDomestic">chinaDomestic (required).</param> /// <param name="brand">brand (required).</param> public ChinaDomesticPaymentMethodAllOf(ChinaDomestic chinaDomestic = default(ChinaDomestic), BrandEnum brand = default(BrandEnum)) { // to ensure "chinaDomestic" is required (not null) this.ChinaDomestic = chinaDomestic ?? throw new ArgumentNullException("chinaDomestic is a required property for ChinaDomesticPaymentMethodAllOf and cannot be null"); this.Brand = brand; }
public static double GetPrice(this BrandEnum brandEnum) { return(0); }
/// <summary> /// 取得庫存 /// </summary> /// <returns></returns> public List <Item> GetStorage(BrandEnum brand, FlavorEnum flavor, PackageEnum package, ProductionType productionType, ProductionDetail productionDetailType) { return(_stockService.GetStorage(brand, flavor, package, productionType, productionDetailType)); }
public List <Item> GetItems(BrandEnum brand, FlavorEnum flavor, ProductionType type, ProductionDetail detail) { throw new NotImplementedException(); }