Save (insert or update) a record.
The saved entity (with generated ID if inserted)
The entity to save