public IActionResult Dojo(int id)
 {
     ViewBag.dojo        = dojoFactory.FindByID(id);
     ViewBag.dojoNinjas  = ninjaFactory.FindByDojo(id);
     ViewBag.rogueNinjas = ninjaFactory.FindRogueNinjas();
     return(View());
 }
        public IActionResult DisplayDojo(int dojo_id)
        {
            //runs the DojoFind query from DojoFactory.cs
            var dojo = _dojoFactory.DojoFind(dojo_id);

            ViewBag.ninjaDojoList = _ninjaFactory.FindNinjasInDojo(dojo_id);
            ViewBag.rougeNinjas   = _ninjaFactory.FindRogueNinjas();
            //if query returns null, then redirect to dojos.
            if (dojo == null)
            {
                return(RedirectToAction("Dojos"));
            }
            return(View("Dojo", dojo));
        }