MySQL · Types · Other public types
ArxConnection
Definition
- Namespace
ARX.SDK.Services- Package
ARX.SDK
public abstract class ArxConnection : IAsyncDisposableA connection to one database, opened and closed by ARX. Each provider has its own; this provider's is new ArxMySqlConnection(connectionString). Begin a transaction on it and pass the transaction to service calls; application code never needs the database driver's types.
Methods
Task<ArxTransaction> BeginTransactionAsync(CancellationToken cancellationToken = default)Opens the connection if needed and begins a transaction.
Parameter Type Description cancellationTokenCancellationToken= defaultCancels the call. ValueTask DisposeAsync()Closes the connection. An active transaction on it is rolled back.
Notes
One transaction at a time per connection, and one call at a time. Disposing it closes the connection.