public ActionResult <Model.Pet> Update([FromBody] Model.Pet pet) { using (var scope = new TransactionScope()) { _updatePet.Execute(pet); scope.Complete(); } return(Ok(pet)); }
public ActionResult <Model.Pet> Insert([FromBody] Model.Pet pet) { using (var scope = new TransactionScope()) { var petId = _insertPet.Execute(pet); scope.Complete(); pet.Id = petId; } return(Ok(pet)); }