Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support deleting documents by id or expression as a IMartenOp side effect #1275

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

elexisvenator
Copy link
Contributor

Ran into a situation where I had a handler that only needed to delete a document by id. Felt a bit overkill to fetch the document first so adding in more deletion marten ops to cover the missing delete commands.

Supports:

MartenOps.Delete<T>(int id)
MartenOps.Delete<T>(long id)
MartenOps.Delete<T>(Guid id)
MartenOps.Delete<T>(string id)
MartenOps.Delete<T>(object id)
MartenOps.DelteWhere<T>(Expression<Func<T, bool>> expression)

@jeremydmiller jeremydmiller merged commit 79c7a3a into JasperFx:main Feb 13, 2025
1 check passed
@elexisvenator elexisvenator deleted the martenops-delete branch February 13, 2025 20:39
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.

2 participants