Skip to content

Update MongoDbStore.cs#65

Merged
sfmskywalker merged 1 commit intodevelop/3.6.0from
sfmskywalker-patch-1
Jul 4, 2025
Merged

Update MongoDbStore.cs#65
sfmskywalker merged 1 commit intodevelop/3.6.0from
sfmskywalker-patch-1

Conversation

@sfmskywalker
Copy link
Member

This pull request updates the MongoDbStore class in src/modules/persistence/Elsa.Persistence.MongoDb/Common/MongoDbStore.cs to enhance the UpdatePartialAsync method with additional functionality and improve error handling.

Enhancements to UpdatePartialAsync:

  • Changed the return type of UpdatePartialAsync from Task to Task<bool> to indicate whether the update operation succeeded.
  • Added a new throwIfNotFound parameter to UpdatePartialAsync, allowing callers to specify whether an exception should be thrown if no matching document is found.
  • Implemented conditional logic based on throwIfNotFound to either throw an InvalidOperationException or return false when no document matches the provided ID.
  • Modified the method to return true if the update modifies at least one document, or false otherwise.

@sfmskywalker sfmskywalker merged commit 1d41492 into develop/3.6.0 Jul 4, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant