-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from Nikoo-Asadnejad/Nikoo-Asadnejad-patch-1
Update README.md
- Loading branch information
Showing
1 changed file
with
23 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,25 @@ | ||
# GenericRepository | ||
A Class library which implements GenericRepository Pattern for connecting to SQl Server Db, | ||
It Contains both Asynchronous and Synchronous methods. | ||
Command And Query Respository are seprated and Query Repository is wrapped by a cache repository which has been implemented using decorator pattern. | ||
Domain Event handling and Audit logs are also implemented in this repository. | ||
This class library implements the Generic Repository Pattern for SQL Server databases. It supports both asynchronous and synchronous operations and is designed to offer a clean and efficient data access layer. | ||
|
||
|
||
|
||
## Key Features : | ||
- Separation of Command and Query Repositories: Distinguishes between command (write) and query (read) operations to adhere to the CQRS pattern. | ||
- Cache Repository with Decorator Pattern: Enhances the query repository with caching to improve performance and reduce database load. | ||
- Domain Event Handling: Facilitates decoupled communication and business logic execution based on domain events. | ||
- Audit Logging: Provides comprehensive logging of repository operations for traceability and accountability. | ||
|
||
## Components : | ||
|
||
- Generic Repository Interface: Defines the standard CRUD methods for data access. | ||
- Command Repository: Manages create, update, and delete operations. | ||
- Query Repository: Manages read operations and is enhanced with caching capabilities. | ||
- Cache Repository: Implements caching for the query repository using the decorator pattern. | ||
- Domain Event Handler: Handles domain events and executes related actions. | ||
- Audit Log Service: Records and manages audit logs for repository interactions. | ||
|
||
## Configuration: | ||
Pass `IServiceCollection` to following method to add services to your DI: | ||
```csharp | ||
GenericRepositoryConfigurator.InjectServices(services); | ||
``` |