diff --git a/web/backend/Database/Database.Connection/Repository.cs b/web/backend/Database/Database.Connection/Repository.cs index b4a9f08f..4bce5bb3 100644 --- a/web/backend/Database/Database.Connection/Repository.cs +++ b/web/backend/Database/Database.Connection/Repository.cs @@ -18,4 +18,21 @@ public abstract class DapperRepository(ISqlConnectionFactory connectionFactory) await connection.OpenAsync(); return connection; } + + /// + /// Rolls back , 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. + /// + protected static async Task RollbackQuietlyAsync(DbTransaction transaction) + { + try + { + await transaction.RollbackAsync(); + } + catch + { + // Ignore: the original exception (rethrown by the caller) is what matters here. + } + } } diff --git a/web/backend/Domain/Domain.Entities/Entities/Photo.cs b/web/backend/Domain/Domain.Entities/Entities/Photo.cs new file mode 100644 index 00000000..e69de29b diff --git a/web/backend/Features/Features.Breweries/Repository/BreweryRepository.cs b/web/backend/Features/Features.Breweries/Repository/BreweryRepository.cs index 52862175..40f3a5b0 100644 --- a/web/backend/Features/Features.Breweries/Repository/BreweryRepository.cs +++ b/web/backend/Features/Features.Breweries/Repository/BreweryRepository.cs @@ -441,22 +441,6 @@ public class BreweryRepository(ISqlConnectionFactory connectionFactory) } } - /// - /// Rolls back , 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. - /// - private static async Task RollbackQuietlyAsync(DbTransaction transaction) - { - try - { - await transaction.RollbackAsync(); - } - catch - { - // Ignore: the original exception (rethrown by the caller) is what matters here. - } - } /// /// Composes a joined row's , , diff --git a/web/backend/Features/Features.PhotoUpload/Features.PhotoUpload.csproj b/web/backend/Features/Features.PhotoUpload/Features.PhotoUpload.csproj new file mode 100644 index 00000000..e30a34d5 --- /dev/null +++ b/web/backend/Features/Features.PhotoUpload/Features.PhotoUpload.csproj @@ -0,0 +1,22 @@ + + + net10.0 + enable + enable + Features.ImageUploads + + + + + + + + + + + + + + + +