How lugoz99/library-management works
This repository implements a category and subcategory management API: clients send HTTP requests, controllers delegate to services for validation and CRUD operations, and repositories persist entities through Entity Framework Core. Pagination and HTTP error conversion support that workflow. The README describes a broader library database—including users, books, sales, and promotions—but the supplied source tree only implements category and subcategory functionality; those other domains are not represented as runtime components here. Some relationships are shown only by the SOURCE INDEX or README, so unsampled subsystems are not inferred.
Main entry points: SubCategoryService.cs Subcategory Service · Program.cs Application Startup · CategoryService.cs Category Service · ApplicationDbContext.cs EF Core Context
Components 15
HTTP API
- Application Startup
LibraryManagement/Program.cs - Category Controller
LibraryManagement/Controllers/CategoryController.cs - Subcategory Controller
LibraryManagement/Controllers/SubCategoryController.cs - Catalog DTOs
LibraryManagement/Models/DTOs/Categories/CategoryDto.cs
Catalog Services
- Category Service
LibraryManagement/Services/Implementation/CategoryService.cs - Subcategory Service
LibraryManagement/Services/Implementation/SubCategoryService.cs - Category Entity
LibraryManagement/Models/Category.cs - Subcategory Entity
LibraryManagement/Models/SubCategory.cs
Persistence
- Category Repository
LibraryManagement/Repository/CategoryRepository.cs - Subcategory Repository
LibraryManagement/Repository/SubCategoryRepository.cs - EF Core Context
LibraryManagement/Data/ApplicationDbContext.cs
API Support
- Pagination Helpers
LibraryManagement/Common/Pagination/QueryableExtensions.cs - HTTP Error Mapping
LibraryManagement/Common/FluentResultsEndpointProfile.cs
Other components
- API Client
- SQL Server
Connections 20
- API Client → Category Controller: sends requests
LibraryManagement/Controllers/CategoryController.cs - API Client → Subcategory Controller: sends requests
LibraryManagement/Controllers/SubCategoryController.cs - Application Startup → Category Controller: maps controllers
LibraryManagement/Program.cs - Application Startup → Subcategory Controller: maps controllers
LibraryManagement/Program.cs - Category Controller → Category Service: delegates to
LibraryManagement/Controllers/CategoryController.cs - Subcategory Controller → Subcategory Service: delegates to
LibraryManagement/Controllers/SubCategoryController.cs - Category Service → Category Repository: queries and saves
LibraryManagement/Services/Implementation/CategoryService.cs - Subcategory Service → Subcategory Repository: queries and saves
LibraryManagement/Services/Implementation/SubCategoryService.cs - Subcategory Service → Category Repository: checks parent
LibraryManagement/Services/Implementation/SubCategoryService.cs - Category Repository → EF Core Context: uses context
LibraryManagement/Repository/CategoryRepository.cs - Subcategory Repository → EF Core Context: uses context
LibraryManagement/Repository/SubCategoryRepository.cs - EF Core Context → Category Entity: maps entity
LibraryManagement/Data/ApplicationDbContext.cs - EF Core Context → Subcategory Entity: maps entity
LibraryManagement/Data/ApplicationDbContext.cs - Category Entity → Subcategory Entity: has many
LibraryManagement/Data/ApplicationDbContext.cs - Application Startup → SQL Server: configures provider
LibraryManagement/Program.cs - Category Service → Pagination Helpers: pages results
LibraryManagement/Services/Implementation/CategoryService.cs - Subcategory Service → Pagination Helpers: pages results
LibraryManagement/Services/Implementation/SubCategoryService.cs - Application Startup → HTTP Error Mapping: registers profile
LibraryManagement/Program.cs - Category Service → Catalog DTOs: maps responses
LibraryManagement/Services/Implementation/CategoryService.cs - Subcategory Service → Catalog DTOs: maps responses
LibraryManagement/Services/Implementation/SubCategoryService.cs