Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kawser2133/performance_optimized_api
This project demonstrates an API optimized for high performance using techniques like Dapper for faster data access, caching strategies (Redis, In-Memory), and efficient query handling with both Entity Framework (EF) and Dapper. It also explores various performance improvement strategies for APIs.
https://github.com/kawser2133/performance_optimized_api
asp-net-core caching dapper entity-framework-core performance-optimization redis rest-api web-api
Last synced: 13 days ago
JSON representation
This project demonstrates an API optimized for high performance using techniques like Dapper for faster data access, caching strategies (Redis, In-Memory), and efficient query handling with both Entity Framework (EF) and Dapper. It also explores various performance improvement strategies for APIs.
- Host: GitHub
- URL: https://github.com/kawser2133/performance_optimized_api
- Owner: kawser2133
- License: mit
- Created: 2024-10-12T18:32:45.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-10-16T15:56:38.000Z (29 days ago)
- Last Synced: 2024-11-02T01:05:54.719Z (13 days ago)
- Topics: asp-net-core, caching, dapper, entity-framework-core, performance-optimization, redis, rest-api, web-api
- Language: C#
- Homepage: https://binarybytez.com/high-performance-dotnet-core-api-guide/
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Performance Optimized API
This project demonstrates an API optimized for high performance using techniques like Dapper for faster data access, caching strategies (Redis, In-Memory), and efficient query handling with both Entity Framework (EF) and Dapper. It also explores various performance improvement strategies for APIs.
## Key Features
1. **Efficient Data Access**
- Entity Framework Core for complex queries
- Dapper for optimized read operations
- Asynchronous programming for improved responsiveness2. **Caching Strategies**
- In-Memory caching for frequently accessed data
- Distributed caching with Redis for scalability3. **Performance Optimizations**
- Pagination for large data sets
- Sorting capabilities
- AsNoTracking for read-only queries4. **Clean Architecture**
- Repository pattern
- Separation of concerns
- Dependency Injection5. **Data Mapping**
- AutoMapper for object-to-object mapping6. **Data Seeding**
- Bogus library for generating realistic test data## Getting Started
1. Clone the repository
2. Ensure you have .NET Core SDK installed
3. Set up your database connection string in `appsettings.json`
4. Run `dotnet ef database update` to create the database
5. Run `dotnet run` to start the application## Configuration
- Database: PostgreSQL
- Caching: Redis (ensure Redis server is running)
- ORM: Entity Framework Core
- Micro-ORM: Dapper## Usage
1. Seed the database using Bogus (configured in the DataSeeder class).
2. Use the API endpoints to test CRUD operations and observe the performance difference between EF and Dapper.
3. Monitor Redis for cache hits and database access reduction.## Authors
If you have any questions or need further assistance, please contact the project author at [@kawser2133](https://www.github.com/kawser2133) || [![linkedin](https://img.shields.io/badge/linkedin-0A66C2?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/kawser2133)
## Contributing
I want you to know that contributions to this project are welcome. Please open an issue or submit a pull request if you have any ideas, bug fixes, or improvements.
## License
This project is licensed under the [MIT License](LICENSE).