public IActionResult GetByCity(string cityName, string stateName) { var city = _CityRpo.ReadInCity().Where(c => c.cityName == cityName && c.stateName == stateName).FirstOrDefault(); if (city != null) { var issues = _IssueRpo.ReadInIssue().Where(i => i.CityId == city.CityId); if (issues != null) { return(Ok(issues)); } else { return(NotFound()); } } else { return(NotFound()); } }
public IEnumerable <City1> Get() { return(_cityRpo.ReadInCity().ToList()); //return new string[] { "value1", "value2" }; }