mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-14 17:54:42 +00:00
Integrate SeaweedFS for S3-compatible file storage and photo upload (#254)
This commit is contained in:
@@ -18,4 +18,21 @@ public abstract class DapperRepository(ISqlConnectionFactory connectionFactory)
|
||||
await connection.OpenAsync();
|
||||
return connection;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rolls back <paramref name="transaction" />, swallowing any exception the rollback itself
|
||||
/// raises (for example when the provider has already completed the transaction after a
|
||||
/// connection failure) so the exception that triggered the rollback is what propagates.
|
||||
/// </summary>
|
||||
protected static async Task RollbackQuietlyAsync(DbTransaction transaction)
|
||||
{
|
||||
try
|
||||
{
|
||||
await transaction.RollbackAsync();
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Ignore: the original exception (rethrown by the caller) is what matters here.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user