Exemplo n.º 1
0
 public IActionResult Index(string Name)
 {
     if (!String.IsNullOrEmpty(Name))
     {
         return(View(_ChampionshipService.FindByName(Name)));
     }
     else
     {
         return(View(_ChampionshipService.List()));
     }
 }
Exemplo n.º 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));
        }
Exemplo n.º 3
0
 public IActionResult Get()
 {
     return(Ok(_championshipService.List()));
 }