public IActionResult Index(string Name) { if (!String.IsNullOrEmpty(Name)) { return(View(_ChampionshipService.FindByName(Name))); } else { return(View(_ChampionshipService.List())); } }
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())); }