internal static Category GetCategory(List<Category> categorys, SqlDataReader reader)
{
int colIndex = 0;
colIndex = reader.GetOrdinal(CN_CATEGORY_ID);
int value = reader.GetInt32(colIndex);
Category category = categorys.Where(c => c.ID == value).FirstOrDefault();
if (category == null)
{
category = new Category();
categorys.Add(category);
}
return category;
}