public async Task <IActionResult> DeleteLocation(DeleteLocationDTO input) { try { await _locationService.DeleteLocation(input); return(Ok("The process is success")); } catch (Exception) { return(BadRequest("An error occurred during the deleting process. Please try again !")); } }
public async Task DeleteLocation(DeleteLocationDTO input) { await _repository.Delete(input.Id); }