Add EntityManagerBuilder for entity-specific service configuration#105
Merged
Conversation
Address PR review comments: filter interfaces with Where() and project to entity type with Select() instead of inline guards and variable assignment in loops.
…nforce usage of Repository base class
…ssionCache and BoundedFilterCache to inherit from it
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This pull request significantly expands and clarifies the documentation for the
EntityManagerand related features in the Kista data access framework. The main focus is on improving guidance for entity validation, caching, error handling, and registration patterns using the new fluent builder APIs. The docs now provide more concrete examples, recommended practices, and "see also" references for discoverability.Key documentation improvements:
EntityManager usage & registration
EntityManagerdocumentation (entity-manager/README.md) was rewritten to clarify its purpose, available features (validation, caching, error handling, etc.), and the recommended registration patterns using the fluent builder API (WithManagement()). It now covers both per-repository and global manager registration, and explains package dependencies and DI setup.EntityManager<TEntity>and register custom logic in DI, as well as a detailed explanation of theOperationResultpattern for error handling.Entity validation & error factories
entity-validation.md, documenting how to implement, register, and use entity validators (IEntityValidator<TEntity>) and custom error factories (OperationErrorFactory). This includes examples for both the fluent builder and legacy registration, and explains the error handling flow in detail.Caching enhancements
WithEasyCaching()fluent builder methods (per-repository and global), and customize cache key generation withIEntityCacheKeyGenerator<>. Deprecated legacy registration methods in favor of the builder pattern. [1] [2]General improvements and clarifications
Most important changes:
EntityManager registration and usage
entity-manager/README.mdto clarify EntityManager features, explain per-repository and global registration using the fluent builder API, and detail package dependencies and DI setup.OperationResultpattern for structured error handling.Entity validation and error handling
entity-validation.mdpage documenting validator and error factory implementation, registration, and integration with the EntityManager, including best practices and code samples.Caching configuration and customization
WithEasyCaching()usage, cache key customization, and deprecated legacy registration methods. [1] [2]General documentation improvements