// GET: Countries/Details/5 public async Task <IActionResult> Details(int?id) { if (id == null) { return(NotFound()); } var country = await _countries.GetAllDepartmentAndCities((int)id); // _context.Countries //.Include(c => c.Departments) //.ThenInclude(d => d.Cities) //.FirstOrDefaultAsync(m => m.Id == id); if (country == null) { return(NotFound()); } return(View(country)); }