public ActionResult Contact() // I lost track of what this code does. { TagCatsRepoDapper repo = new TagCatsRepoDapper(); IEnumerable <TagCatsTableRow> allCats = repo.GetAll(); List <OutlineVM1> TagIds = new List <OutlineVM1>(); int tagId, parentId; string tagName; foreach (TagCatsTableRow oneTag in allCats) { //tagId = oneTag.TagNameId; //parentId = (int)oneTag.TagParentId; //tagName = oneTag.TagName; OutlineVM1 nextTagInfo = new OutlineVM1(); nextTagInfo.TagId.Add(oneTag.TagNameId); nextTagInfo.ParentId.Add((int)oneTag.TagParentId); TagIds.Add(nextTagInfo); } //Finished the foreach above before stopping. Next, send this model to the html page //and try to use the parentId as the list index of tag Id to try and make an outline. return(View()); }
public void CanLoadAllTags() { TagCatsRepoDapper repo = new TagCatsRepoDapper(); IEnumerable <TagCatsTableRow> allCats = repo.GetAll(); Assert.AreEqual(16, allCats.Count()); }
public ActionResult About() { List <TagCatsTableRow> allCats = _repo.GetAll().ToList(); return(View(allCats)); }