public TableOfContentsViewModel(TableOfContents fromDb, DocsVersion.DocsMode mode) { Mode = mode; this.Key = PrefixHelper.GetCategoryPrefix(fromDb.Category); this.Items = new List <TableOfContentsViewModel>(); this.IsFolder = true; this.Title = fromDb.Category.GetDescription(); this.AddChildren(fromDb.Items); }