public async Task <ActionResult> Edit(int?id) { if (id != null) { var itemToEdit = await _firmRepo.GetAsync(id.Value); if (itemToEdit != null) { return(View(itemToEdit)); } } return(NotFound()); }