public async Task <IActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new NotFoundViewResult("SpecieNotFound"));
            }

            var specie = await _specieRepository.GetByIdAsync(id.Value);

            if (specie == null)
            {
                return(new NotFoundViewResult("SpecieNotFound"));
            }
            return(View(specie));
        }
Exemplo n.º 2
0
        // GET: SpeciesController/Edit/5
        public async Task <IActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var specie = await _specieRepository.GetByIdAsync(id.Value);

            if (specie == null)
            {
                return(NotFound());
            }

            var model = _converterHelper.ToEditViewModel(specie);

            return(View(model));
        }