Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nikoo-asadnejad/genericrepository
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.
https://github.com/nikoo-asadnejad/genericrepository
audit-log csharp decorator-pattern domain-event domain-events dotnet-core dotnetcore ef-core entity-framework-core generic-repositories generic-repository generic-repository-core generic-repository-pattern genericrepository repository repository-pattern unit-of-work-pattern unitofwork unitofwork-pattern
Last synced: about 5 hours ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/nikoo-asadnejad/genericrepository
- Owner: Nikoo-Asadnejad
- Created: 2022-06-04T06:42:49.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-11-07T09:57:15.000Z (1 day ago)
- Last Synced: 2024-11-07T10:26:00.637Z (1 day ago)
- Topics: audit-log, csharp, decorator-pattern, domain-event, domain-events, dotnet-core, dotnetcore, ef-core, entity-framework-core, generic-repositories, generic-repository, generic-repository-core, generic-repository-pattern, genericrepository, repository, repository-pattern, unit-of-work-pattern, unitofwork, unitofwork-pattern
- Language: C#
- Homepage:
- Size: 14.4 MB
- Stars: 12
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GenericRepository
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.
- Support for Multiple DbContext: Enables the handling of multiple database contexts, allowing flexibility and separation of concerns for different data models.
- Raw SQL Execution: Allows execution of raw SQL commands for advanced query scenarios and performance optimization.
- SQL Transactions: Provides support for executing operations within transactions, ensuring data consistency and integrity during batch operations.## Configuration:
Pass `IServiceCollection` to following method to add services to your DI:
```csharp
GenericRepositoryConfigurator.InjectServices(services);
```