public async Task <IActionResult> UpdateCharacter(UpdateCharacterDto updatedCharacter) { ServiceResponse <GetCharacterDto> response = await _repository.UpdateCharacter(updatedCharacter); if (response.Success == false) { return(NotFound(response)); } return(Ok(response)); }
public ActionResult Edit(int id, Character character) { try { // TODO: Add update logic here _characterRepo.UpdateCharacter(character); return(RedirectToAction("Index")); } catch { return(View(character)); } }