The Gestión Clínica API uses the Microsoft Enterprise Library Data Application Block v6 (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ttpullima/RomsoftBackEnd2021_v2/llms.txt
Use this file to discover all available pages before exploring further.
Microsoft.Practices.EnterpriseLibrary.Data) for all SQL Server interactions. The Data block reads connection strings exclusively from the <connectionStrings> section of Web.config, identified by name. No connection string is hard-coded in C# — all repository classes call ConectionStringRepository.ConnectionStringNameSQL to get the name "ConnectionStringSQL" and pass it to DatabaseFactory.CreateDatabase().
Primary SQL Server Connection
The connection string namedConnectionStringSQL points to the production Azure SQL database:
| Parameter | Value | Notes |
|---|---|---|
Server | tcp:romsoftservidor.database.windows.net,1433 | Azure SQL logical server |
Initial Catalog | ROMSOFT-CLINICA | Target database name |
Encrypt | True | Required by Azure SQL |
TrustServerCertificate | False | Validates the server certificate |
Connection Timeout | 30 | Seconds before a connection attempt fails |
MultipleActiveResultSets | False | MARS is disabled |
Switching to a Local SQL Express Instance
A commented-out alternative connection string is included inWeb.config for local development against a SQL Server Express instance:
ROMSOFT-CLINICA) must match the name of the restored database on the local instance.
Secondary Connection — SUSALUD OLEDB Access
A second connection string,ConnectionStringACCESS, targets the SUSALUD IPRESSLOG.mdb Access database used for Peruvian health-regulator (SUSALUD) reporting:
C:\SUSALUD\RED\IPRESSLOG.mdb must exist on the server running the API and be accessible by the application pool identity. In ConectionStringRepository, this string is exposed as ConnectionStringACCESS and ConnectionStringNameACCESS.
Enterprise Library Data Configuration Section
The<configSections> block at the top of Web.config declares the Enterprise Library configuration handler. It must be present for the Data block to initialize correctly:
How the Repository Layer Reads the Connection
The static classConectionStringRepository in Romsoft.GESTIONCLINICA.DataAccess.Core is the single source of truth for connection strings within the data layer:
DatabaseFactory.CreateDatabase(ConectionStringRepository.ConnectionStringNameSQL) to obtain a Database object, then use it to execute stored procedures such as Romsoft.USP_ADM_PACIENTE_INSERT.
SQL Server Version Requirements
The application targets SQL Server 2012 or later (Azure SQL is fully supported). Features used include:- Stored procedures with
OUTPUTparameters for returning inserted IDs OFFSET/FETCH NEXTpagination syntax (SQL Server 2012+)- Azure SQL compatibility level 100+
Managing Secrets with Config Transforms
Do not commit real production credentials
Keep
Web.config credentials pointing at the development/staging database or use placeholder values. Mark the file in .gitignore if credentials must be stored locally.Add a Web.Release.config transform
Visual Studio automatically applies
Web.Release.config when publishing in Release mode. Override the connection string using an xdt:Transform: