public IActionResult GetCovidDataByCounty(string countyName) { if (string.IsNullOrEmpty(countyName)) { ModelState.AddModelError("CountyName", "County name is required"); } return(Ok(_covidDataRepository.GetCovidDataByCounty(countyName))); }
public async Task <List <CovidData> > GetCovidDataByCounty(string countyName) { var covidData = _covidDataRepository.GetCovidDataByCounty(countyName); return(covidData); }