I need to implement multiple categories for articles. I followed the recommendation of adding a ParentCategoryID to the db using the int field type. I have changed the Category.cs, CategoryDetails.cs, and ArticlesProvider.cs files as needed and sucessfully built the solution. Upon running the site I receive the System.InvalidCastException detailed below;
Line 78: protected virtual CategoryDetails GetCategoryFromReader(IDataReader reader)
Line 79: {
Line 80: return new CategoryDetails(
Line 81: (int)reader["CategoryID"],
Line 82: (int)reader["ParentID"],
I must be overlooking something. Any help would be greatly appreciated.
Cheers