withTransaction(_:_:)
Executes a closure with the specified transaction and returns the result.
Declaration
func withTransaction<Result>(_ transaction: Transaction, _ body: () throws -> Result) rethrows -> ResultParameters
- body:
A closure to execute.
Return Value
The result of executing the closure with the specified transaction.