示例#1
0
        public async Task <IActionResult> EditBreed(EditBreedViewModel model)
        {
            if (this.ModelState.IsValid)
            {
                var breed    = _converterHelper.ToBreedEntity(model);
                var specieId = await _specieRepository.UpdateBreedAsync(breed);

                if (specieId != 0)
                {
                    return(this.RedirectToAction($"Details/{specieId}"));
                }
            }

            return(View(model));
        }