Skip to content

Instantly share code, notes, and snippets.

@lexuanquynh
Created July 15, 2022 03:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lexuanquynh/dc23c142b7e8b6656830724658d9925c to your computer and use it in GitHub Desktop.
Save lexuanquynh/dc23c142b7e8b6656830724658d9925c to your computer and use it in GitHub Desktop.
let repository = PetRepository()
repository.save(entity: dog, update: false) { result in
switch result {
case .success:
// Handle success here
print("Handle success here")
case .failure:
print("Handle failed here")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment