private void LoadPricatBrandMapping() { PricatBrandMapping = PricatBrands.ToDictionary( pricatBrand => pricatBrand.Alias, pricatBrand => pricatBrand.Name, StringComparer.CurrentCultureIgnoreCase); }
private void LoadPricatBrandCodes() { BrandCodes = PricatBrands.ToLookup(pricatBrand => pricatBrand.Name, pricatBrand => pricatBrand.Code, StringComparer.OrdinalIgnoreCase); foreach (var brandName in BrandCodes.Where(group => group.Count() > 1).Select(group => group.Key)) { TraceWarning("The brand '{0}' has multiple brand codes.", brandName); } }
private DataTable GetPricatBrands() { return(PricatBrands .Select(item => new { item.Code, Name = item.Name.ToLower().ToTitle() }) .ToDataTable()); }