How kubra-kzlk/web-service-applicatie-lampen works
Main Components
a. Client Layer:
• External clients/systems that consume the API
• Swagger UI as the API documentation/testing interface
b. API Layer:
• Controllers (LampsController, ManufacturersController, StylesController)
• 15 API endpoints grouped by HTTP methods (GET, POST, PUT, DELETE)
c. Service Layer:
• Both implementations:
• In-Memory Services (InMemoryLampData)
• Database Services (LampServiceDB, ManufacturerServiceDB, StyleServiceDB)
• Interface abstractions (ILampData, IManufacturerData, IStyleData)
d. Data Layer:
• DatabaseContext
• Entity Configurations (LampConfiguration, ManufacturerConfiguration, StyleConfiguration)
• Both storage options:
• In-Memory Database
• SQL Server Database
Relationships to Highlight
[External Clients] ←→ [Swagger UI]
• ↓
[API Layer (Controllers)]
• ↓
[Service Layer]
• ↙ ↘
[In-Memory] [Database Services]
• ↓
[Data Layer (Entity Framework)]
• ↙ ↘
[In-Memory DB] [SQL Server]
Important Details
a. Entity Relationships:
• How Lamp entities reference Manufacturer (1:N)
• How Lamp entities relate to Styles (M:N)
b. Cross-Cutting Concerns:
• Automapper for DTO transformations
• Serilog integration for logging
• Data Annotations for validation
Component Details
For each major component, include:
• Component name
• Key responsibilities
• Technologies used
• Dependencies
Architectural Patterns to Highlight
• Repository Pattern (Service layer)
• Dependency Injection
• Interface-based design
• Configuration-based database switching
Notes
Notes to explain:
• How to switch between database implementations
• API endpoint groupings
• Validation flow
• Error handling
Remember to emphasize the RESTful nature of the API and how it handles the three main entities (Lamps, Manufacturers, and Styles) through its various endpoints.