Map the menu contract to view models¶
Project the menu contract object onto MVC view models for rendering. Trigger: OP-11 (build and attach the Business Online menu) step 3.
| Field | Value |
|---|---|
| Operation ID | OP-13 |
| Trigger | OP-11 (build and attach the Business Online menu) step 3 |
| Inputs | BusinessOnlineMenu |
| Outputs | MenuViewModel with Favorites and Items |
| Primary components | Mappers.MapMenuViewModel(BusinessOnlineMenu) |
| Entry point | src/Web.Mvc/Classes/Mappers.cs |
Steps¶
- Project
bolMenu.FavoritesandbolMenu.Itemsthrough the privateMapMenuItems, copyingApplicationName,FavoriteName,MenuCategory,MenuCategoryCode,PageId,PageLink,PageName, andTooltipontoMenuItemViewModel. - The projection is a lazy
Selectwith no materialization, so enumeration happens at render time.*
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([BusinessOnlineMenu])
Map[Project Favorites and Items]
EndOk([MenuViewModel])
Start --> Map
Map --> EndOk
Failure and edge-case behavior¶
- No unexpected failure paths beyond argument-guard exceptions and delegated dependency behavior were identified for this operation.
Related documentation¶
Note: Statements marked with
*were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with**could not be confirmed; treat as unknown until verified.
Sources¶
src/Web.Mvc/Classes/Mappers.cs