internal static ProductPrice GetProductPrice(List<ProductPrice> ProductPrices, SqlDataReader reader) { int colIndex = 0; colIndex = reader.GetOrdinal(CN_PRODUCT_PRICE_ID); int value = reader.GetInt32(colIndex); ProductPrice ProductPrice = ProductPrices.Where(c => c.ID == value).FirstOrDefault(); if (ProductPrice == null) { ProductPrice = new ProductPrice(); ProductPrices.Add(ProductPrice); } return ProductPrice; }