private void AddTag() { Blog blog = _blogRepository.Get(_blogId); Console.WriteLine($"Which tag would you like to add to {blog.Title}?"); List <Tag> tags = _tagRepository.GetAll(); for (int i = 0; i < tags.Count; i++) { Tag tag = tags[i]; Console.WriteLine($" {i + 1}) {tag.Name}"); } Console.Write("> "); string input = Console.ReadLine(); try { int choice = int.Parse(input); Tag tag = tags[choice - 1]; _blogRepository.InsertTag(blog, tag); } catch (Exception ex) { Console.WriteLine("Invalid Selection. Won't add any tags."); } }