public async Task <IActionResult> Details(int?id) { if (id == null) { return(NotFound()); } var samurai = await _samuraiRepository.GetSamuraiDetails(id.Value); samurai.SamuraiBattles = await _samuraiRepository.GetBattles(id.Value); //There was a bug for double include hence above second trip if (samurai == null) { return(NotFound()); } return(View(samurai)); }
// GET: Battles public async Task <IActionResult> Index() => View(await _samuraiRepository.GetBattles());