direct-stock
Multi-component solution for managing Travel Counsellors' directly-contracted stock (accommodation, transfers, ground handling): a WCF service, a WinForms manager app, shared domain/contract packages and five SQL databases.
Health score
0 to 100 across seven weighted factors; nothing is hidden. Green is 75 and above, amber 50 to 74, red below 50. How scoring works.
Facts
| Languages | csharp, sql |
| Frameworks | WCF (wsHttpBinding), WinForms, .NET Standard 2.0 domain package |
| Runtimes | .NET Framework 4.6.2, .NET Framework 4.8.1 |
| Tests / CI | some / CI in place |
| Last commit | 2026-05-22 |
| Owner | Owner unknown (mapping to be curated) |
| Domain | Selling and quoting (system generated; curate in repo-owners.json to override) |
| Product area | Phenix |
| Hosted | On-prem Deployed to our own machines
|
| Releases | 8 release pipeline(s): \commercial\direct-stock-manager QA; \commercial\direct-stock-manager Release; \commercial\direct-stock\direct-stock-accommodation-service; \commercial\direct-stock\direct-stock-database-AuditDirectStockAccommodationContract; \commercial\direct-stock\direct-stock-database-DirectStockAccommodationContract; \commercial\direct-stock\direct-stock-database-DirectStockGroundHandlingContract; \commercial\direct-stock\direct-stock-database-DirectStockTransferContract; \commercial\direct-stock\direct-stock-database-GroundHandling |
| Integration | wcf, soap, sqlserver |
| Source | Open in Azure DevOps |
Risk flags
Each flag links to its glossary definition.
Dependencies in context
Entanglement
loosely attached Bound into the core by 1 mechanism(s).
- Speaks WCF (host)
Detaches when its WCF surface gains a modern interface or its WCF calls move to one.
Migration playbooks
Generated from this repo's assessment data: what is feasible, what blocks it, and the steps in order. Ratings: green means actionable now, amber means sequence other work first, red means blocked, grey means not applicable.
ZDD adoption
Not applicableNot a deployed service (libraries, database definitions, desktop apps) or a retirement candidate not worth the investment. Desktop application distributed to user machines; server-side ZDD does not apply.
SQL Server exit
Blocked by a shared databasesqlserver:DirectStockAccommodationContract is shared, so this system cannot change engine on its own: every sharer moves in convoy. Either agree the move with all sharers as one programme, or first split this system's data out behind an owned API, then follow the steps below.
- Inventory the schema and query surface of sqlserver:DirectStockAccommodationContract, sqlserver:AuditDirectStockAccommodationContract, sqlserver:DirectStockGroundHandlingContract, sqlserver:DirectStockTransferContract, sqlserver:GroundHandling: tables, stored procedures, triggers, cross-database joins and anything else engine-specific.
- Confirm the target: PostgreSQL (relational model; keep transactions and joins, swap the engine).
- Replatform to modern .NET first (see the recommended actions): current PostgreSQL and MongoDB drivers and EF Core providers target modern .NET, and doing one risky change at a time is cheaper than doing two.
- Data access is not through an ORM, so port the SQL by hand: translate T-SQL constructs, replace stored procedures with application code or target-native equivalents, and add integration tests around the queries that matter first.
- Stand up the target alongside SQL Server, backfill with an ETL pass (pgloader or an export/import job), then dual-write or replicate until parity is proven.
- Move reads to the target, watch correctness and latency, then cut writes over and keep SQL Server read-only until confidence is earned.
- Decommission the SQL Server database and remove the connection strings and firewall paths that pointed at it.
Containerisation
Not appropriateThis is a desktop application distributed to user machines; containers do not apply. Its modernisation path is replacement by a web application, not containerisation.
Recommended actions
Replatform direct-stock to modern .NET
Runs on .NET Framework 4.6.2, .NET Framework 4.8.1, out of mainstream support. No pinning dependency blocks it; sequence by fan-in (providers before consumers).
Impact: Unblocks 3 dependent system(s)
proposedAssessment notes
direct-stock
Purpose
Monorepo for the direct-stock domain: contracted accommodation, transfer and ground-handling inventory. Components: TC.Phenix.DirectStockAccommodation.Service (IIS-hosted WCF .svc), TC.Phenix.DirectStockManager (WinForms desktop app for commercial users), a shared domain package (TC.Phenix.DirectStock), a service-contract package, and five change-script SQL database projects under src/db.
Tech stack
C# on .NET Framework — the WCF service targets 4.6.2, the WinForms manager 4.8.1; the domain library multi-targets netstandard2.0/net462 and is published as a NuGet package (Nerdbank versioning). TC.ConnectionBroker (Sql/Wcf/HttpClient, Ninject and SimpleInjector extensions), TC.Exceptions, TC.Phenix.DataAccess/Configuration/User, TC.UserAccount.ServiceClient, TC.ExchangeRate.ServiceClient. WCF uses wsHttpBinding with secure and insecure bindings and per-environment Web.config transforms.
Deployment
Included as a prod application with 8 releases — the largest footprint in this batch. Thirteen build pipelines (build-service-wcf.yml, build-domain-package.yml, build-service-contract.yml, plus per-database azure-pipelines.yml files and the DirectStockManager master-feature/release pipelines) and release pipelines under \commercial\direct-stock\ for the accommodation service and each database, plus direct-stock-manager QA/Release for the desktop app.
Dependencies
Internal: tc-connectionbroker for SQL/WCF connection brokering, tc-exceptions for error handling, and exchange-rate-service via TC.ExchangeRate.ServiceClient (currency conversion in the manager app). Also consumes Phenix data-access/configuration and UserAccount service client packages built from other estate repos. The service contract package is consumed by Phenix callers.
Data stores
Five SQL Server databases with numbered change scripts: DirectStockAccommodationContract (about 300 objects — the core), AuditDirectStockAccommodationContract, DirectStockGroundHandlingContract, DirectStockTransferContract and GroundHandling.
Integration points
SOAP/WCF (wsHttpBinding) service endpoints consumed by Phenix and the manager app; direct SQL Server access from both service and thick client via connection broker.
Code health
Unit tests exist only for the service contract and service projects — thin for the codebase size; the WinForms manager has none. CI covers all components including differential DB packaging. Actively maintained (last commit 2026-05-22) but the README is untouched boilerplate.
Modernisation risks
High: .NET Framework 4.6.2 WCF service (WCF has no supported path on modern .NET without CoreWCF), a WinForms thick client with direct DB access, and five separate databases whose contracts are shared across components. Active business change on a legacy foundation makes this a strong candidate for phased replacement — REST/gRPC service plus web UI — before the framework becomes a blocker.