internal static Style GetStyle(List<Style> styles, SqlDataReader reader) { int colIndex = 0; colIndex = reader.GetOrdinal(CN_STYLE_ID); int value = reader.GetInt32(colIndex); Style style = styles.Where(c => c.ID == value).FirstOrDefault(); if (style == null) { style = new Style(); styles.Add(style); } return style; }