Example #1
0
 public IActionResult Index(string Name)
 {
     if (!String.IsNullOrEmpty(Name))
     {
         return(View(_ChampionshipService.FindByName(Name)));
     }
     else
     {
         return(View(_ChampionshipService.List()));
     }
 }
Example #2
0
        public ActionResult Index(string searchString /*, bool searchresult*/)
        {
            var championships = _championshipService.List();

            if (!String.IsNullOrEmpty(searchString))
            {
                championships = _championshipService.FindByBoxerName(searchString).ToList();
            }
            //if (searchresult == true)
            //{
            //    championships = _championshipService.GetResult(searchresult).ToList();
            //}
            return(View(championships));
        }
 public IActionResult Get()
 {
     return(Ok(_championshipService.List()));
 }