diff --git a/src/ParcelRegistry.Projections.BackOffice/BackOfficeProjections.cs b/src/ParcelRegistry.Projections.BackOffice/BackOfficeProjections.cs index 12445cdd..c2909537 100644 --- a/src/ParcelRegistry.Projections.BackOffice/BackOfficeProjections.cs +++ b/src/ParcelRegistry.Projections.BackOffice/BackOfficeProjections.cs @@ -21,6 +21,8 @@ await backOfficeContext.AddIdempotentParcelAddressRelation( new ParcelId(message.Message.ParcelId), new AddressPersistentLocalId(addressPersistentLocalId), cancellationToken); + + await backOfficeContext.SaveChangesAsync(cancellationToken); } }); @@ -31,6 +33,8 @@ await backOfficeContext.AddIdempotentParcelAddressRelation( new ParcelId(message.Message.ParcelId), new AddressPersistentLocalId(message.Message.AddressPersistentLocalId), cancellationToken); + + await backOfficeContext.SaveChangesAsync(cancellationToken); }); When>(async (_, message, cancellationToken) => @@ -40,6 +44,8 @@ await backOfficeContext.RemoveIdempotentParcelAddressRelation( new ParcelId(message.Message.ParcelId), new AddressPersistentLocalId(message.Message.AddressPersistentLocalId), cancellationToken); + + await backOfficeContext.SaveChangesAsync(cancellationToken); }); When>(async (_, message, cancellationToken) => @@ -49,6 +55,8 @@ await backOfficeContext.RemoveIdempotentParcelAddressRelation( new ParcelId(message.Message.ParcelId), new AddressPersistentLocalId(message.Message.AddressPersistentLocalId), cancellationToken); + + await backOfficeContext.SaveChangesAsync(cancellationToken); }); When>(async (_, message, cancellationToken) => @@ -58,6 +66,8 @@ await backOfficeContext.RemoveIdempotentParcelAddressRelation( new ParcelId(message.Message.ParcelId), new AddressPersistentLocalId(message.Message.AddressPersistentLocalId), cancellationToken); + + await backOfficeContext.SaveChangesAsync(cancellationToken); }); When>(async (_, message, cancellationToken) => @@ -67,6 +77,8 @@ await backOfficeContext.RemoveIdempotentParcelAddressRelation( new ParcelId(message.Message.ParcelId), new AddressPersistentLocalId(message.Message.AddressPersistentLocalId), cancellationToken); + + await backOfficeContext.SaveChangesAsync(cancellationToken); }); When>(async (_, message, cancellationToken) =>