How nurlan-shirinov/restaurantmanagement_fbms_1_23_4_az_v2 works
RestaurantManagement is an ASP.NET Core restaurant-management API. Its principal workflow is an HTTP request entering a controller, being dispatched through MediatR to a category or user operation, and using the unit of work and SQL repositories for persistence before returning a response. The source index also shows authentication, refresh-token handling, user-context support, and background user deletion. Some handlers and integrations were not excerpted, so uncertain dispatch links are marked unverified or omitted.
Main entry points: SqlUnitOfWork.cs Unit of work · AppDbContext.cs EF database context · Program.cs API runtime · CategoryController.cs Category API
Components 21
HTTP API
- Category API
RestaurantManagement/Controllers/CategoryController.cs - User API
RestaurantManagement/Controllers/UserController.cs - API runtime
RestaurantManagement/Program.cs - Exception handling
RestaurantManagement/Middlewares/ExceptionHandlerMiddleware.cs
Application workflows
- Category workflows
Application/CQRS/Categories/Handlers - User workflows
Application/CQRS/Users/Handlers - Request validation
Application/PipelineBehaviors/ValidationPipelineBehavior.cs - Current user context
RestaurantManagement/Infrastructure/HttpUserContext.cs - Token service
Application/Services/TokenService.cs - User cleanup
Application/Services/BackgroundServices/DeleteUserBackgroundService.cs - Object mapping
Application/AutoMapper/MappingProfile.cs
Domain
- Category
Domain/Entites/Category.cs - User
Domain/Entites/User.cs - Refresh token
Domain/Entites/RefreshToken.cs
SQL persistence
- Unit of work
DAL.SqlServer/UnitOfWork/SqlUnitOfWork.cs - Category repository
DAL.SqlServer/Infrastructure/SqlCategoryRepository.cs - User repository
DAL.SqlServer/Infrastructure/SqlUserRepository.cs - Refresh-token repository
DAL.SqlServer/Infrastructure/SqlRefreshTokenRepository.cs - EF database context
DAL.SqlServer/Context/AppDbContext.cs
Other components
- API client
- SQL Server
Connections 16
- API client → Category API: sends request
RestaurantManagement/Controllers/CategoryController.cs - API client → User API: sends request
RestaurantManagement/Controllers/UserController.cs - Category API → Category workflows: dispatches commands
- User API → User workflows: dispatches requests
RestaurantManagement/Controllers/UserController.cs - API runtime → Exception handling: registers middleware
RestaurantManagement/Program.cs - API runtime → Current user context: registers context
RestaurantManagement/Program.cs - Category workflows → Unit of work: uses
Application/CQRS/Categories/Handlers/CommandHandlers/CreateCategoryHandler.cs - User workflows → Unit of work: uses
Application/CQRS/Users/Handlers/Update.cs - User cleanup → Unit of work: uses
Application/Services/BackgroundServices/DeleteUserBackgroundService.cs - Unit of work → Category repository: provides repository
DAL.SqlServer/UnitOfWork/SqlUnitOfWork.cs - Unit of work → User repository: provides repository
DAL.SqlServer/UnitOfWork/SqlUnitOfWork.cs - Unit of work → Refresh-token repository: provides repository
DAL.SqlServer/UnitOfWork/SqlUnitOfWork.cs - Category repository → EF database context: queries categories
DAL.SqlServer/Infrastructure/SqlCategoryRepository.cs - User repository → EF database context: uses context
DAL.SqlServer/Infrastructure/SqlUserRepository.cs - Refresh-token repository → EF database context: uses context
DAL.SqlServer/Infrastructure/SqlRefreshTokenRepository.cs - EF database context → SQL Server: persists entities