Commit Graph

14 Commits

Author SHA1 Message Date
Developer 02
ee793632df Add SQL exception handling configuration support
Updated Program.cs to configure SQL exception handling using the new "SqlException" section in appsettings.json. Renamed "SqlExceptionTranslator" to "SqlException" and added error message mappings for specific SQL exception numbers to enable custom exception translation.
2026-01-22 01:46:46 +01:00
Developer 02
22bb585f60 Refactor SQL exception handling and config structure
Simplify SQL exception tracking by replacing error message mappings
with a list of relevant error numbers in appsettings.json. Remove
custom error message logic and related classes, introducing
SqlExceptionOptions to hold tracked error codes.
2026-01-22 01:45:50 +01:00
Developer 02
ed7237c8dd Add SqlExceptionTranslator config and options class
Introduce SqlExceptionTranslator section in appsettings.json to map common SQL error codes to user-friendly messages. Add SqlExceptionTranslatorOptions class to manage error code/message mapping and support configuration binding.
2026-01-22 01:13:02 +01:00
6b8286a386 Move logging config to appsettings.Logging.json
Extracted "Logging" and "NLog" sections from appsettings.json into a new appsettings.Logging.json file. No changes were made to the logging settings themselves; this improves configuration separation and maintainability.
2025-12-15 16:15:01 +01:00
ae548d530f Enable Swagger via configuration setting
Added a condition in `Program.cs` to enable Swagger when the `UseSwagger` configuration value is `true`, in addition to the development environment.

Introduced a new `UseSwagger` setting in `appsettings.json` with a default value of `true`, allowing Swagger to be conditionally enabled in non-development environments. This improves flexibility for Swagger usage across different environments.
2025-12-08 10:07:57 +01:00
b71ea7d346 Update log file naming convention in NLog config
The `logFileNamePrefix` variable in the `NLog` configuration was updated to use a period (`.`) instead of a hyphen (`-`) as the separator between the date and the application name.

Old format: `${shortdate}-Rec.API.Web`
New format: `${shortdate}.Rec.API`

This change aligns the log file naming convention with a new standard or improves consistency across file naming practices.
2025-12-05 10:32:11 +01:00
9992086e48 Add NLog configuration and minor property updates
Added a new NLog configuration section in `appsettings.json` to enable structured logging. This includes settings for log file storage, log targets for different levels (Info, Warn, Error, Fatal), and retention policies.

Added the `NLog` property to the configuration. Introduced a new `AddedWho` property with the value `ReC.API`.

Removed and re-added the `FakeProfileId` property without changing its value. No changes were made to `LuckyPennySoftwareLicenseKey` or `RecAction` sections.
2025-12-05 09:58:05 +01:00
f4390d992a Refactor to use configurable FakeProfileId
Replaced hardcoded FakeProfileId with a dynamic value retrieved
from the configuration using a new GetFakeProfileId extension
method. Updated OutResController and RecActionController to
inject IConfiguration and use the new method. Added a new
HttpGet endpoint in OutResController for fake profile queries.

Modified appsettings.json to include a FakeProfileId setting
with a default value of 2. Introduced ConfigurationExtensions
to centralize configuration access logic, improving code
maintainability and flexibility.
2025-12-04 11:14:37 +01:00
2c005c35fb Add database connection string to appsettings.json
Added a new "ConnectionStrings" section to the `appsettings.json`
file, including a "Default" connection string for SQL Server.
The connection string specifies the server, database, user
credentials, and options to disable encryption and trust the
server certificate. This change configures database connectivity
for the application.
2025-12-03 11:08:53 +01:00
269578194a Replace MediatRLicense with LuckyPennySoftwareLicenseKey
The `MediatRLicense` key was removed from `appsettings.json`
and replaced with the `LuckyPennySoftwareLicenseKey`. This
change likely reflects a transition to a new licensing
mechanism. No other modifications were made to the file.
2025-12-03 10:08:15 +01:00
d4bd8b0d1a Update appsettings.json configuration
Removed `MaxConcurrentInvocations` from the `RecAction` section.
Added a new property `AddedWho` with the value `"ReC.API"`.
2025-12-01 10:38:54 +01:00
cd8f757c43 Add RecAction configuration support
Introduced a new `RecAction` configuration section in `appsettings.json` with a `MaxConcurrentInvocations` property. Updated `Program.cs` to use the `Configuration` object to pass the `RecAction` settings to the `AddRecServices` method. Replaced the `MediatRLicense` value in `appsettings.json` with no functional changes.
2025-11-27 10:12:44 +01:00
89879d0821 Add services and update project configuration
Added `AddRecServices` and `AddInfrastructureServices` to `Program.cs` with necessary configurations. Updated `ReC.API.csproj` to include project references to `ReC.Application` and `ReC.Infrastructure`, and fixed an encoding issue by adding a BOM. Modified `appsettings.json` to include `MediatRLicense` and adjusted `AllowedHosts` format. Ensured `TargetFramework` and other project properties remain unchanged.
2025-11-25 16:52:21 +01:00
9de7b89a81 Set up ASP.NET Core Web API project structure
Initialized the ASP.NET Core application in `Program.cs` with
services for controllers, Swagger/OpenAPI, and middleware
for HTTPS redirection and authorization.

Added `launchSettings.json` to configure application launch
profiles for HTTP, HTTPS, and IIS Express environments.

Updated `ReC.API.csproj` to target .NET 8.0, enable nullable
reference types, and include the `Swashbuckle.AspNetCore`
package for Swagger support.

Added `appsettings.json` and `appsettings.Development.json`
for logging and environment-specific configurations.

Reorganized the solution structure in `ReC.sln` by moving
the `ReC.API` project under a `src` folder and updating
the `NestedProjects` section.
2025-11-25 00:28:46 +01:00