public ActionResult GetCountryData(string countryCode) { CountryMetricDetails model = null; using (var context = AppDbContext) { var results = GetCountriesData(context, countryCode); model = results.FirstOrDefault(); } return(SerializeToJsonFormatted(model)); }
public ActionResult Details(string countryCode) { // Just group all countries up by name, date (day) CountryMetricDetails model = null; using (var context = AppDbContext) { var results = GetCountriesData(context, countryCode); model = results.FirstOrDefault(); } return(View(model)); }