public async Task <IActionResult> Edit(int id, [Bind("Id,Description")] Specie specie) { if (id != specie.Id) { return(new NotFoundViewResult("SpecieNotFound")); } if (ModelState.IsValid) { try { await _specieRepository.UpdateAsync(specie); } catch (DbUpdateConcurrencyException) { if (!await _specieRepository.ExistAsync(specie.Id)) { return(new NotFoundViewResult("SpecieNotFound")); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(specie)); }