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 | Suffix | 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 | Itm.Database.Entities | Class name is mapped as table name and properties as field names. |
| 2. | Configure table mappings | Itm.Database.Context | Can specifify primary key, rename fields, etc. |
| 3. | Create a repository: class and interface | Itm.Database.Repositories | |
| 4. | Create business logic | Itm.Database.Services | This is called by UI. Entities(DB) are mapped with Models(UI). |
- Create new WPF User Control Project
- Create a View and View Model for Main Content
- Create a View and View Model for Menu
- Create a class that implements IModule
- Register the new module
Packages: Prism.Wpf v6.3.0 Prism.Unity v6.3.0
DO NOT USE: Will set User properties to NULL if property not exists in UserModel. Use instead: Mapper.Map(updates, user);