How sanketch04/productapi works
This ASP.NET Core product-management API supports product CRUD, image upload/download, QR generation, reports, and email. The main workflow is an HTTP request through a controller, into a business service, through the product repository, and to the database; image and QR operations branch from the product API, while reports and email have separate endpoints. Source excerpts show product and image persistence details. Report and email implementation links are based on the SOURCE INDEX; their downstream behavior is not fully shown.
Main entry points: Program.cs App Registration · ProductsController.cs Products API · ProductRepository.cs Product Repository · ProductImageService.cs Image Service
Components 20
HTTP API
- Products API
Product.API/Controllers/ProductsController.cs - Email API
Product.API/Controllers/EmailController.cs - Report API
Product.API/Controllers/ReportController.cs - Product DTOs
Product.Common/DTOs/ProductResponseDto.cs - Create DTO
Product.Common/DTOs/ProductCreateDto.cs - Update DTO
Product.Common/DTOs/ProductUpdateDto.cs - Image Upload DTO
Product.Common/DTOs/ProductImageUploadDto.cs - Email Request
Product.API/Models/SendEmailRequest.cs - App Registration
Product.API/Program.cs
Business Services
- Product Service
Product.BLL/Implementation/ProductService.cs - Image Service
Product.BLL/Implementation/ProductImageService.cs - QR Service
Product.BLL/Implementation/QrService.cs - Report Service
Product.BLL/Implementation/ReportSevice.cs - Email Service
Product.BLL/Implementation/EmailService.cs
Product Data
- Product Repository
Product.DAL/Implementation/ProductRepository.cs - EF DbContext
Product.DAL/Context/AppDbContext.cs - Product Entity
Product.DAL/Entities/ProductEntity.cs
Product Assets & Integrations
- Uploaded Images
Product.API/wwwroot/uploads/products
Other components
- API Client
- SQL Server
Connections 29
- API Client → Products API: sends HTTP
Product.API/Controllers/ProductsController.cs - API Client → Email API: sends HTTP
Product.API/Controllers/EmailController.cs - API Client → Report API: sends HTTP
Product.API/Controllers/ReportController.cs - Products API → Product Service: calls CRUD
Product.API/Controllers/ProductsController.cs - Products API → Image Service: calls image ops
Product.API/Controllers/ProductsController.cs - Products API → QR Service: requests QR
- Products API → Create DTO: accepts input
Product.API/Controllers/ProductsController.cs - Products API → Update DTO: accepts input
Product.API/Controllers/ProductsController.cs - Products API → Image Upload DTO: accepts upload
Product.API/Controllers/ProductsController.cs - Product Service → Product DTOs: maps results
Product.BLL/Implementation/ProductService.cs - Product Service → Product Repository: calls data access
Product.BLL/Implementation/ProductService.cs - Image Service → Product Repository: reads product
Product.BLL/Implementation/ProductImageService.cs - Image Service → Uploaded Images: writes and reads
Product.BLL/Implementation/ProductImageService.cs - Image Service → Product Repository: updates image path
Product.BLL/Implementation/ProductImageService.cs - QR Service → Product Repository: looks up product
Product.BLL/Implementation/QrService.cs - Report API → Report Service: requests report
Product.API/Controllers/ReportController.cs - Report Service → Product Repository: uses products
Product.BLL/Implementation/ReportSevice.cs - Email API → Email Service: sends request
Product.API/Controllers/EmailController.cs - Email API → Email Request: accepts payload
Product.API/Controllers/EmailController.cs - Product Repository → EF DbContext: queries and saves
Product.DAL/Implementation/ProductRepository.cs - EF DbContext → Product Entity: maps table
Product.DAL/Context/AppDbContext.cs - EF DbContext → SQL Server: persists records
- App Registration → EF DbContext: configures database
Product.API/Program.cs - App Registration → Product Repository: registers implementation
Product.API/Program.cs - App Registration → Product Service: registers implementation
Product.API/Program.cs - App Registration → Image Service: registers implementation
Product.API/Program.cs - App Registration → QR Service: registers implementation
Product.API/Program.cs - App Registration → Report Service: registers implementation
Product.API/Program.cs - App Registration → Email Service: registers implementation
Product.API/Program.cs