Renamed UpdateEndpointAuthProcedure to UpdateEndpointAuthCommand across the codebase for improved naming consistency. Updated controller, handler, and tests to use the new command name, aligning with CQRS conventions for state-modifying operations.
Refactored all usages of InsertEndpointAuthProcedure to InsertEndpointAuthCommand, including method signatures, handler interfaces, and test cases, to better align with CQRS naming conventions for write operations.
Renamed DeleteEndpointAuthProcedure to DeleteEndpointAuthCommand across the codebase, including controller, handler, and tests, to improve naming consistency and align with CQRS conventions for write operations.
Refactored test code to remove ToObjectProcedure usage and send command objects directly to the mediator. Updated update procedure tests to use Data and Id properties. Replaced custom Execute*Procedure methods with sender.Send. Cleaned up unused usings. These changes improve consistency and reflect updates to command structures.
Introduced PreprocessingBehavior implementing MediatR's IPipelineBehavior for InvokeRecActionViewCommand. This behavior executes a preprocessing SQL query if specified, and halts processing if an error occurs and ErrorAction is set to Stop. Added necessary using directives for dependencies.
Replaced sender.ExecuteInsertProcedure with sender.Send for executing InsertResultProcedure. Removed the _options.AddedWho parameter, passing only the procedure object and cancellation token. The construction of InsertResultProcedure remains unchanged.
Replaced *Procedure properties in UpdateObjectProcedure with corresponding DTO types (e.g., UpdateActionDto, UpdateEndpointDto, etc.) and added the necessary DTO namespace import. This decouples the record from procedure logic, improving separation of concerns and data transfer handling.
Changed IUpdateProcedure to a generic interface IUpdateProcedure<T>, adding Id (long) and Data (T) properties for improved type safety and flexibility in update procedures. The interface continues to inherit from IRequest<int>.
Refactored Update*Procedure records to encapsulate update data in dedicated DTOs (e.g., UpdateActionDto, UpdateEndpointDto) via a generic Data property. Updated interfaces to be generic and modified handlers to pass only the DTO to UpdateObjectProcedure. This improves maintainability, reduces duplication, and standardizes update logic across entities.
Introduced six new DTO record classes under ReC.Application.Common.Procedures.UpdateProcedure.Dto to support partial (nullable) updates for Action, Endpoint, EndpointAuth, EndpointParams, Profile, and Result entities. These DTOs enable PATCH-like update operations by allowing selective property updates. No existing code was modified.
Standardize command handling by replacing custom mediator methods
with mediator.Send in ResultController. Update PUT endpoint to
remove id route parameter and rely on payload for identification.
Simplified controller by removing IConfiguration dependency and unused usings. Refactored all endpoints to use MediatR's Send method with command objects, eliminating custom mediator extension methods and route parameters like id. This streamlines command handling and reduces dependencies.
Replaces custom Execute*Procedure methods with MediatR's Send for insert, update, and delete operations. Removes obsolete using directives. Updates the PUT endpoint to accept the profile ID in the request body instead of the route.
Removed IConfiguration dependency and replaced custom mediator
extension methods with standard mediator.Send calls for endpoint
commands. Simplified method signatures and removed unused usings.
Updated PUT endpoint to accept UpdateEndpointProcedure directly.
Removed IConfiguration dependency and custom MediatR extension methods from EndpointParamsController. All command handling now uses mediator.Send directly, and route/config parameters have been eliminated from endpoints. Cleaned up unused usings and streamlined controller logic.
Replaced custom procedure execution methods with MediatR's Send method in EndpointAuthController. Removed obsolete using directives and updated the PUT endpoint to no longer require an id route parameter, expecting the id in the payload instead. This streamlines the controller and aligns it with standard MediatR practices.
Refactored InsertProfileProcedure by removing the ToObjectProcedure method and introducing InsertProfileProcedureHandler, which implements IRequestHandler and delegates insert logic via MediatR's ISender. Updated using directives to include MediatR. This aligns profile insertion with the MediatR request/response pattern.
Introduce DeleteProfileProcedureHandler using MediatR's IRequestHandler to process DeleteProfileProcedure requests. The handler sends a DeleteObjectProcedure via ISender, replacing the previous ToObjectProcedure method. Also, add necessary using directives and refactor logic to centralize command handling.
Refactored UpdateEndpointProcedure to implement IUpdateProcedure directly and removed the ToObjectProcedure method. Introduced UpdateEndpointProcedureHandler using MediatR's ISender for command handling, aligning with MediatR patterns and enabling dependency injection.
Refactored InsertEndpointProcedure to remove the ToObjectProcedure method, making it a simple data record. Introduced InsertEndpointProcedureHandler using MediatR's IRequestHandler to handle insert commands asynchronously. Added necessary MediatR using directives.
Replaces the ToObjectProcedure method with a dedicated
DeleteEndpointProcedureHandler implementing IRequestHandler.
The handler uses MediatR's ISender to send DeleteObjectProcedure,
improving separation of concerns and aligning with MediatR
request/response patterns.
Refactored UpdateEndpointParamsProcedure to include all relevant properties and removed the ToObjectProcedure method. Introduced UpdateEndpointParamsProcedureHandler using MediatR's IRequestHandler, delegating update logic via ISender. This improves code structure and maintainability.
Remove ToObjectProcedure method from InsertEndpointParamsProcedure and introduce InsertEndpointParamsProcedureHandler using MediatR's IRequestHandler. This decouples conversion and command logic, aligning with MediatR patterns and improving separation of concerns.
Replaces ToObjectProcedure with DeleteEndpointParamsProcedureHandler using MediatR's request/handler pattern. Improves separation of concerns by delegating deletion logic to the handler and updates imports and namespace accordingly.
Deleted the DeleteObjectProcedureExtensions static class and its ExecuteDeleteProcedure extension methods from DeleteObjectProcedure.cs. These methods previously provided convenience for executing delete procedures via ISender. The core DeleteObjectProcedure record and its handler remain unchanged.
Expanded UpdateEndpointAuthProcedure with new properties and removed the ToObjectProcedure method. Introduced UpdateEndpointAuthProcedureHandler using MediatR's ISender for command handling, improving separation of concerns and enabling dependency injection.
Move insert logic from InsertEndpointAuthProcedure to a new InsertEndpointAuthProcedureHandler using MediatR. Remove ToObjectProcedure method and update usings. The record now serves as a pure data structure.
Refactored DeleteEndpointAuthProcedure by removing the ToObjectProcedure method and introducing DeleteEndpointAuthProcedureHandler, which implements IRequestHandler and delegates deletion via MediatR's ISender. Consolidated using directives and namespace declarations.
ChangedWho is now initialized directly and no longer settable via a public method. Removed the ChangedBy method and related extension methods. Added a TODO to move ChangedWho assignment to authentication middleware in the future.
Removed AddedBy method and related extension; AddedWho is now set to a default value internally. Added a TODO to move AddedWho assignment to authentication middleware in the future.
Refactored IUpdateProcedure to inherit from MediatR's IRequest<int> for integration with the MediatR pipeline. Removed the ToObjectProcedure method and added the necessary using directive for MediatR. This simplifies the interface and standardizes request handling.
IInsertProcedure now inherits from IRequest<long> to integrate with MediatR's request/response pattern. Removed the ToObjectProcedure method and added the necessary MediatR using directive.
IDeleteProcedure now inherits from MediatR's IRequest<int>, aligning it with MediatR request/response patterns. Removed the ToObjectProcedure method from the interface. Added the MediatR using directive. Note: The namespace and using directive are now on the same line, which may need formatting correction.
Added Database property to IRecDbContext for database operations. Introduced ExecuteDynamicSqlAsync extension method to run arbitrary SQL and return results as JSON. This enables flexible querying and result serialization.
Refactored UpdateProfileProcedure to implement IUpdateProcedure and expanded its properties. Removed ToObjectProcedure method. Introduced UpdateProfileProcedureHandler using MediatR's ISender for command dispatch. Modernized structure to use record types and handler classes.
Refactored DeleteActionProcedure to implement IDeleteProcedure directly and removed the ToObjectProcedure method. Introduced DeleteActionProcedureHandler using MediatR's IRequestHandler to delegate deletion logic via ISender. Updated using directives for MediatR integration.
Replaces the ToObjectProcedure method with an InsertActionProcedureHandler that implements IRequestHandler using MediatR. The handler maps InsertActionProcedure to InsertObjectProcedure and sends it via ISender. Also updates using statements to include MediatR.
Expanded UpdateActionProcedure with new properties and removed the ToObjectProcedure method. Introduced UpdateActionProcedureHandler using MediatR to handle update logic and delegate to UpdateObjectProcedure. Centralized update logic in the handler for better maintainability.
Remove ToObjectProcedure method and add DeleteResultProcedureHandler implementing IRequestHandler. The handler sends DeleteObjectProcedure via MediatR, mapping relevant properties. Also update using directives and namespace.
Refactored InsertResultProcedure by removing its ToObjectProcedure method and introducing InsertResultProcedureHandler, which implements IRequestHandler and delegates object insertion via MediatR's ISender. This shifts conversion logic from the record to the handler and improves separation of concerns.
Refactored UpdateResultProcedure to implement IUpdateProcedure directly and removed the ToObjectProcedure method. Introduced UpdateResultProcedureHandler using MediatR's IRequestHandler pattern, delegating update logic via ISender. This improves code structure and maintainability.
Added two new SQL parameters, @pRESULT_INFO and @pRESULT_ERROR, to InsertObjectProcedure.cs. These are set from request.Result.Info and request.Result.Error, or to DBNull.Value if null, to support additional result data in the procedure.
Added nullable string properties Info and Error to the InsertResultProcedure record to allow storing additional information and error messages related to insert operations.
Added Info and Error properties to the entity configuration, mapping them to the RESULT_INFO and RESULT_ERROR columns in the database using HasColumnName. This allows the entity to store and retrieve additional result information and error details.
Extended ResultView with four new nullable string properties:
Info and Error for additional details and error messages,
and AddedWho and ChangedWho for tracking user metadata.
Removed unnecessary using statements for ReC.API.Extensions and ReC.API.Models to clean up the code and improve maintainability. No functional changes were made.
Refactored authentication logic for REST actions to use a structured switch block, adding explicit support for ApiKey, BearerToken, JwtBearer, OAuth2, BasicAuth, and NTLM authentication types. Introduced dedicated HttpClient/Handler for NTLM with proper disposal. Improved extensibility, clarity, and resource management. Added IOptions and Options usage for configuration.
Added logic to set HTTP/1.1 and exact version policy for NTLM
authentication requests when the UseHttp1ForNtlm option is true.
This ensures compatibility with NTLM endpoints requiring HTTP/1.1.