The architecture includes the following levels:
- Entity Layer: Contains entities (POCOs)
- Data Layer: Contains all related code to database access
- Business Layer: Contains definitions and validations related to business
- Presentation Layer: Contains User Interfaces
Layer | Content | Has Interface | Prefix | Remarks |
---|---|---|---|---|
Entity Layer | DB Models | No | (none) | Properties are mapped to DB fields |
Data Layer | DB Context and | No | (none) | |
DB Configurations | No | Configuration | Configuration: Object property to DB field mapping | |
DB Repositories | Yes | Repository | ||
Business Layer | DB Service | Yes | Service | DB Models are converted to UI Models and vice-versa |
Presentation Layer | UI Models | No | Model | |
View Models | No | ViewModel | ||
View | No | (none) |
No. | Content | Target Project | Remarks |
---|---|---|---|
1. | Add new class for the table | CompleetShop.Database.Entities | Class name is mapped as table name and properties as field names. |
2. | Configure table mappings | CompleetShop.Database.Context | Can specifify primary key, rename fields, etc. |
3. | Create a repository: class and interface | CompleetShop.Database.Repositories | |
4. | Create business logic | CompleetShop.Database.Services | This is called by UI. Entities(DB) are mapped with Models(UI). |