public async Task <IActionResult> Edit(int?id) { if (id == null) { return(NotFound()); } var lostItem = await repository.GetLostItemById(id); ViewBag.LGA = await lgaRepository.GetAllLGAByStateId(lostItem.LocalGovernment.StateId); if (lostItem == null) { return(NotFound()); } return(View(lostItem)); }
public async Task <IEnumerable <LocalGovernment> > LocalGovernments(int id) { return(await localGovernmentRepository.GetAllLGAByStateId(id)); }