public async Task <IActionResult> Delete([Required] string personId) { try { await _personApplicationService.DeleteById(personId); return(Ok(new { message = "Delete Person Success!" })); } catch (Exception ex) { _logger.LogError(ex, "Delete Person Error!"); return(BadRequest(new { message = ErrorMessage })); } }
public IActionResult Delete(string personId) { _personApplicationService.DeleteById(personId); return(Ok()); }