public IActionResult Index(int?id) { APIHandler webHandler = new APIHandler(); FishingAreas fishingAreas = webHandler.GetFishingAreas(); if (id != null) { FishingArea selectedFishingArea = fishingAreas.getFishingArea((int)id); fishingAreas.data = new List <FishingArea> { selectedFishingArea }; return(View(fishingAreas)); } return(View(fishingAreas)); }
public IActionResult SearchbyCounty(string?county) { APIHandler webHandler = new APIHandler(); FishingAreas fishingAreas = webHandler.GetFishingAreas(); if (string != null) { FishingArea selectedFishingArea = fishingAreas.getFishingArea((string)county); fishingAreas.data = new List <FishingArea> { selectedFishingArea }; return(View(fishingAreas)); } return(View(fishingAreas)); }