コード例 #1
0
        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));
        }
コード例 #2
0
 public async Task <IEnumerable <LocalGovernment> > LocalGovernments(int id)
 {
     return(await localGovernmentRepository.GetAllLGAByStateId(id));
 }