Exemplo n.º 1
0
        public async Task <IActionResult> UpdateCharacter(UpdateCharacterDto updatedCharacter)
        {
            ServiceResponse <GetCharacterDto> response = await _repository.UpdateCharacter(updatedCharacter);

            if (response.Success == false)
            {
                return(NotFound(response));
            }
            return(Ok(response));
        }
Exemplo n.º 2
0
 public ActionResult Edit(int id, Character character)
 {
     try
     {
         // TODO: Add update logic here
         _characterRepo.UpdateCharacter(character);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View(character));
     }
 }