AbstractFinds an entity by its ID.
The entity ID (string)
The entity or null if not found
Saves an entity (creates or updates).
The entity to save
Deletes an entity by its ID.
The entity ID (string) to delete
Checks if an entity exists.
The entity ID (string) to check
true if entity exists, false otherwise
Counts entities matching an optional predicate.
Optionalpredicate: (entity: TEntity) => booleanOptional function to test each entity
Count of matching entities
Saves multiple entities in batch.
Array of entities to save
Base in-memory repository implementation.
Provides common CRUD operations for entities stored in memory. Useful for development, testing, and prototyping.
Example