public async Task <IActionResult> Edit(int id) { var itemImport = await _repository.GetItemImport(id); if (itemImport == null) { ViewBag.ErrorMessage = "لايوجد بيانات"; return(View("NotFound")); } ViewData["ItemOfProductId"] = new SelectList(await _repository.GetItemOfProducts(), "Id", "Name", itemImport.Id); return(View(itemImport)); }