# arazabedi/cognizantdataverse architecture

> Architecture diagram of the GitHub repository arazabedi/cognizantdataverse, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arazabedi/cognizantdataverse
- Repository: https://github.com/arazabedi/cognizantdataverse

## Overview

Cognizant Dataverse CRUD Demo is a console application for managing accounts, contacts, and incidents in Microsoft Dataverse. A user selects an entity area in the main menu, then performs create, read, update, delete, or list operations; entity-specific controllers collect input and display results through the console UI, while services perform Dataverse operations. List operations map Dataverse entities into application models. The README documents all three CRUD areas and input/API error feedback. The supplied source samples do not include Account and Incident model files, so their paths and conversion links rely on the documented tree and README.

Main entry points: [`CityPowerAndLight/Controller/MainController.cs`](https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/Controller/MainController.cs) (Main navigation), [`CityPowerAndLight/View/ConsoleUI.cs`](https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/View/ConsoleUI.cs) (Console UI), [`CityPowerAndLight/Controller/AccountController.cs`](https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/Controller/AccountController.cs) (Account controller), [`CityPowerAndLight/Service/AccountService.cs`](https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/Service/AccountService.cs) (Account service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application flow"]
  node_program["Application startup<br/>[Program.cs]"]
  node_main["Main navigation<br/>[MainController.cs]"]
end

subgraph group_interface["Console interface"]
  node_ui["Console UI<br/>[ConsoleUI.cs]"]
end

subgraph group_account["Account operations"]
  node_accountcontroller["Account controller"]
  node_accountservice["Account service<br/>[AccountService.cs]"]
  node_accountmodel["Account model<br/>[Account.cs]"]
end

subgraph group_contact["Contact operations"]
  node_contactcontroller["Contact controller"]
  node_contactservice["Contact service<br/>[ContactService.cs]"]
  node_contactmodel["Contact model<br/>[Contact.cs]"]
end

subgraph group_incident["Incident operations"]
  node_incidentcontroller["Incident controller"]
  node_incidentservice["Incident service<br/>[IncidentService.cs]"]
  node_incidentmodel["Incident model<br/>[Incident.cs]"]
end

node_user(("Console user"))
node_dataverse[("Microsoft Dataverse")]

node_user -->|"enters prompts"| node_ui
node_program -->|"connects"| node_dataverse
node_program -->|"starts"| node_main
node_main -->|"prompts and displays"| node_ui
node_main -->|"dispatches"| node_accountcontroller
node_main -->|"dispatches"| node_contactcontroller
node_main -->|"dispatches"| node_incidentcontroller
node_accountcontroller -->|"prompts and displays"| node_ui
node_accountcontroller -->|"invokes CRUD"| node_accountservice
node_accountservice -->|"reads and writes"| node_dataverse
node_accountservice -->|"maps list results"| node_accountmodel
node_contactcontroller -->|"prompts and displays"| node_ui
node_contactcontroller -->|"invokes CRUD"| node_contactservice
node_contactservice -->|"reads and writes"| node_dataverse
node_contactservice -->|"maps list results"| node_contactmodel
node_incidentcontroller -->|"prompts and displays"| node_ui
node_incidentcontroller -->|"invokes CRUD"| node_incidentservice
node_incidentservice -->|"reads and writes"| node_dataverse
node_incidentservice -->|"maps list results"| node_incidentmodel

click node_program "https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/Program.cs"
click node_main "https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/Controller/MainController.cs"
click node_ui "https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/View/ConsoleUI.cs"
click node_accountcontroller "https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/Controller/AccountController.cs"
click node_accountservice "https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/Service/AccountService.cs"
click node_accountmodel "https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/Model/Account.cs"
click node_contactcontroller "https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/Controller/ContactController.cs"
click node_contactservice "https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/Service/ContactService.cs"
click node_contactmodel "https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/Model/Contact.cs"
click node_incidentcontroller "https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/Controller/IncidentController.cs"
click node_incidentservice "https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/Service/IncidentService.cs"
click node_incidentmodel "https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/Model/Incident.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_program,node_main,node_user toneBlue
class node_ui,node_dataverse toneAmber
class node_accountcontroller,node_accountservice,node_accountmodel toneMint
class node_contactcontroller,node_contactservice,node_contactmodel toneRose
class node_incidentcontroller,node_incidentservice,node_incidentmodel toneIndigo
```

## Components

### Application flow

- [Application startup](https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/Program.cs): `CityPowerAndLight/Program.cs`
- [Main navigation](https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/Controller/MainController.cs): `CityPowerAndLight/Controller/MainController.cs`

### Console interface

- [Console UI](https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/View/ConsoleUI.cs): `CityPowerAndLight/View/ConsoleUI.cs`

### Account operations

- [Account controller](https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/Controller/AccountController.cs): `CityPowerAndLight/Controller/AccountController.cs`
- [Account service](https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/Service/AccountService.cs): `CityPowerAndLight/Service/AccountService.cs`
- [Account model](https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/Model/Account.cs): `CityPowerAndLight/Model/Account.cs`

### Contact operations

- [Contact controller](https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/Controller/ContactController.cs): `CityPowerAndLight/Controller/ContactController.cs`
- [Contact service](https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/Service/ContactService.cs): `CityPowerAndLight/Service/ContactService.cs`
- [Contact model](https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/Model/Contact.cs): `CityPowerAndLight/Model/Contact.cs`

### Incident operations

- [Incident controller](https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/Controller/IncidentController.cs): `CityPowerAndLight/Controller/IncidentController.cs`
- [Incident service](https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/Service/IncidentService.cs): `CityPowerAndLight/Service/IncidentService.cs`
- [Incident model](https://github.com/arazabedi/cognizantdataverse/blob/master/CityPowerAndLight/Model/Incident.cs): `CityPowerAndLight/Model/Incident.cs`

### Other components

- **Console user**
- **Microsoft Dataverse**

## Connections

- Console user → Console UI: enters prompts
- Application startup → Microsoft Dataverse: connects
- Application startup → Main navigation: starts
- Main navigation → Console UI: prompts and displays
- Main navigation → Account controller: dispatches
- Main navigation → Contact controller: dispatches
- Main navigation → Incident controller: dispatches
- Account controller → Console UI: prompts and displays
- Account controller → Account service: invokes CRUD
- Account service → Microsoft Dataverse: reads and writes
- Account service → Account model: maps list results
- Contact controller → Console UI: prompts and displays
- Contact controller → Contact service: invokes CRUD
- Contact service → Microsoft Dataverse: reads and writes
- Contact service → Contact model: maps list results
- Incident controller → Console UI: prompts and displays
- Incident controller → Incident service: invokes CRUD
- Incident service → Microsoft Dataverse: reads and writes
- Incident service → Incident model: maps list results
