# DataSourceController

**Kind:** Controller

**Source:** `Pams/API/Pams.API/Controllers/DashBoard/DataSourceController.cs` (line 18)

**Part of:** [Pams](subsystem-pams)

## Where it refuses work

- `DataSourceController` stops the work with an early return when `project.Databases == null || project.Databases.Count == 0`, in 4 places.
- `DataSourceController` stops the work with an early return when `System.Configuration.ConfigurationManager.ConnectionStrings[ID] == null`, in 2 places.
- `DataSourceController` stops the work with an early return when `System.Configuration.ConfigurationManager.ConnectionStrings[parameter.Connection] == null`, in 2 places.

## When something fails

- `DataSourceController` handles failure in 9 places: it turns it into a return value in 7, and logs it and continues in 2.

## Relationships

- MODULE_DECLARES → `GetAllConnections`
- MODULE_DECLARES → `GetAllViews`
- MODULE_DECLARES → `GetAllTableColumns`
- MODULE_DECLARES → `GetAllViewColumns`
- MODULE_DECLARES → `getTableData`
- IMPORTS → `BaseController`
- IMPORTS → `DataSourceConnectionBindingModel`
- IMPORTS → `TableDataBinding`
- IMPORTS → `DataType`
- IMPORTS → `ViewDataBinding`
- IMPORTS → `GetColumnPrameter`
- IMPORTS → `ColumnDataBinding`
- IMPORTS → `Table`
- IMPORTS → `View`

## Used by

3 references from 3 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

### calls by (3)

- `AppSettings` — `Frontend/src/app/settings/app/app.settings.ts`:241
- `AppSettings` — `Pams/Web/Pams.Web/Client/app/settings/app/app.settings.ts`:126
- `AppSettings` — `Pams/Web/Pams.WebApp/Client/app/settings/app/app.settings.ts`:6
