Switched configuration and DI from Cultures to MultiCulture.
Adjusted middleware registration so CultureMiddleware runs after ExceptionHandlingMiddleware.
Refactored Culture model to use required and non-nullable properties.
Removed nullable checks for Info in ShowEnvelope.cshtml.
Changed DI from Cultures to MultiCulture in _ViewImports.cshtml.
Refactored all references from Cultures to MultiCulture in controllers and base classes. Updated the class definition in MultiCulture.cs to improve clarity and consistency in culture-related functionality. No functional changes were made.
Changed CultureMiddleware to check if the culture cookie value is in the list of supported languages, not just for null or empty. This ensures that only valid, supported culture values are accepted from the cookie; otherwise, the middleware falls back to Accept-Language or default logic.
The Localize endpoint in TestLocalizerController now accepts the "key" parameter as a route parameter instead of a query string. The method signature was updated to use [FromRoute], and the route template was modified to include "{key}". This changes the endpoint usage from /localize?key=de_DE to /localize/de_DE.
Changed GetCulture to return current UI culture if cookie is missing, ensuring a non-null result. Reordered middleware in Program.cs to run ExceptionHandlingMiddleware after CultureMiddleware.
Added two endpoints to TestLocalizerController for retrieving culture from Accept-Language and user cookies. Enhanced GetCulture extension to parse and return the actual culture string from cookies. Updated usings for new extension methods.
Introduced a new extension method, GetCultureByAcceptLanguage, in the WebExtensions class. This method parses the Accept-Language header from the HTTP request and returns the first valid CultureInfo, enabling detection of the user's preferred culture from browser settings.
When no culture cookie is present, use the browser's Accept-Language
header to determine the user's preferred culture. This culture is
applied and stored in a cookie, enhancing localization by respecting
user preferences instead of always defaulting to the application's
default language.
Marked CreateAsync in ReadOnlyController as [Obsolete] to encourage use of MediatR. Simplified Flag.DataIntegrityIssue reference in EnvelopeMailService error handling.
Replaces IAuthenticator with ISender in EnvelopeMailService, updates the constructor accordingly, and removes unused dependencies. Improves code readability and formatting, cleans up unused usings and redundant code, and aligns with the intended MediatR-based architecture. No functional changes to email sending logic.
Replaced direct service dependency and base class inheritance with MediatR in TestEmailTemplateController. Updated the GetAll endpoint to use a MediatR query and removed obsolete code related to the previous service-based approach. This aligns the controller with CQRS/MediatR best practices.
Renamed ReadEmailTemplateById and ReadEmailTemplateByType to ReadEmailTemplateAsync in ReadEmailTemplateQueryExtensions. This improves naming consistency and better reflects their asynchronous behavior. No changes to method signatures or functionality.
Introduced ReadEmailTemplateQueryExtensions with methods to fetch a single EmailTemplateDto by ID or type and language code. Added required using directive for EnvelopeGenerator.Application.Common.Extensions. These extensions streamline querying email templates via ISender.
Simplified the Get method to always require a ReadEmailTemplateQuery and CancellationToken, delegating all queries to the mediator. Removed conditional logic for handling null or missing parameters. Updated XML documentation to reflect the new method signature.
ReadEmailTemplateQuery now returns a collection of EmailTemplateDto, with optional filtering by Id, Type, and new LangCode property. Query handler updated to return all matching templates instead of a single result, and NotFoundException handling was removed.
Changed EmailTemplateDto properties from init-only to mutable (get/set), removed 'required' from Name, and added a new LangCode property with a default value. Also updated using directives and added conditional compilation in EmailTemplate.cs for .NET Framework compatibility. No functional changes to EmailTemplate class.
Introduced a required LangCode property to the EmailTemplate entity, mapped to the LANG_CODE column in the database as varchar(5). This supports language-specific email templates.
Introduced IHasChangedWhen interface to EnvelopeReceiver and History.
Added HasEmailAndName property to EnvelopeReceiver.
Updated AutoMapperAuditingExtensions to map ChangedWhen to UTC.
Removed redundant using statements and fixed formatting.
Introduced AutoMapperAuditingExtensions with MapAddedWhen and MapChangedWhen methods to standardize mapping of auditing timestamps. Refactored MappingProfile to use these extensions for AddedWhen and ChangedWhen fields, improving code clarity. Updated DocumentStatus to implement auditing interfaces and added necessary imports.
Replaced granular auditing interfaces with IUpdateAuditable and ICreationAuditable in ElementAnnotation, EnvelopeReceiverReadOnly, and Signature to modernize and consolidate auditing logic.
Moved auditing interfaces to EnvelopeGenerator.Domain.Interfaces.Auditing. Updated entity classes to reference the new namespace. Added ICreationAuditable and IUpdateAuditable interfaces to improve code organization and clarify auditing responsibilities.
Refactored Envelope, Receiver, and Signature entity classes to eliminate preprocessor directives around class and property definitions. Applied attributes directly and reformatted properties for clarity. Constructors are now always present, with default initializations still conditional where needed. Removed obsolete directives from IHasAddedWho. These changes improve code readability, maintainability, and cross-platform compatibility.
Large-scale cleanup of entity and interface classes:
- Removed obsolete #if NET/NETFRAMEWORK preprocessor blocks
- Unified class/property formatting and indentation
- Standardized use of data annotations
- Improved nullable reference type handling
- Simplified interfaces (IHasEnvelope, IHasReceiver)
- Removed redundant and dead code
- No changes to business logic or data model
These changes modernize and standardize the codebase for easier maintenance and .NET compatibility.
Introduced interfaces for audit fields (AddedWhen, ChangedWhen, ChangedWho, AddedWho) and updated domain entities to implement them. Adjusted properties for consistency and nullability. Updated MappingProfile to map audit fields between DTOs and entities. Improves auditability and standardization across the domain model.
Implement IRequest for CreateDocStatusCommand and add CreateDocStatusCommandHandler to enable MediatR request handling. Add necessary using directives and support repository injection in the handler.
Changed CreateCommandHandler to implement IRequestHandler<TCommand, TEntity> and updated method signatures to return the created entity. Adjusted generic constraints to require TCommand to implement IRequest<TEntity>.
Introduced a generic CreateCommandHandler class implementing MediatR's IRequestHandler to handle create commands. The handler uses a generic IRepository to perform asynchronous entity creation and supports dependency injection for repository access.
Refactored UpdateEmailTemplateCommand and its handler to inherit from generic UpdateCommand and UpdateCommandHandler base classes. Replaced QueryExpression with BuildQueryExpression(), removed redundant Update property, and cleaned up unused usings. This improves code reuse, modularity, and consistency across update commands.
Introduced abstract UpdateCommand<TUpdateDto, TEntity> and UpdateCommandHandler<TCommand, TUpdateDto, TEntity> in EnvelopeGenerator.Application.Common.Commands. This provides a reusable, type-safe pattern for update operations using a generic repository and MediatR, requiring implementers to supply an update DTO and a query expression for entity selection.
- Introduce EmailTemplateUpdateDto for update payloads.
- Expose Id and Type directly on UpdateEmailTemplateCommand; remove EmailTemplateQuery property.
- Add QueryExpression for flexible template selection by Id or Type.
- Remove AutoMapper and EmailTemplateDto usage from handler; update repository call to use EmailTemplateUpdateDto.
- Update MappingProfile to map EmailTemplateUpdateDto to EmailTemplate and set ChangedWhen to DateTime.UtcNow.
- Remove obsolete code and improve documentation.
Refactored ReadEmailTemplateQuery and handler to use non-nullable EmailTemplateDto, throwing NotFoundException when no template is found. Updated namespaces and using statements for consistency. Added detailed XML docs for query properties. Controller updated to reference new query namespace.
Introduced MappingProfile in EmailTemplates namespace.
Maps EmailTemplate to EmailTemplateDto and UpdateEmailTemplateCommand to EmailTemplate, ignoring Id and setting ChangedWhen to current time.
Updated XML comments in ResetEmailTemplateCommand and IEmailTemplateQuery to use HTML line breaks (<br/>) for example template types. This enhances readability in environments that render HTML in documentation. No functional changes were made.
Replaced EmailTemplateQueryBase record with IEmailTemplateQuery interface for email template queries. Updated all relevant commands, queries, and controller methods to use the new interface. Removed EmailTemplateQueryBase and migrated properties to implementing classes. Improved documentation to clarify query structure and Type property usage.
Replaced specific Update command import with general Commands namespace import to streamline access to all command classes. No functional changes made.
Changed namespace from .Commands.Reset to .Commands for ResetEmailTemplateCommand and its handler. Reformatted and re-indented code for readability; no functional changes were made.
ResetEmailTemplateCommandHandler and its dependencies were relocated from ResetEmailTemplateCommandHandler.cs to ResetEmailTemplateCommand.cs. The handler logic and Defaults collection remain unchanged. Using statements were updated to support the move.
Refactored by relocating UpdateEmailTemplateCommandHandler from its own file into UpdateEmailTemplateCommand.cs. Updated using statements accordingly. No logic changes; improves cohesion and maintainability. Removed the now-unnecessary UpdateEmailTemplateCommandHandler.cs file.
Refactored the EmailTemplateQuery record to EmailTemplateQueryBase across the codebase. Updated all references, method signatures, inheritance, and documentation to use the new base type. No functional changes; this improves clarity and generalization for email template queries.
The [Obsolete("Use IRepository")] attribute was removed from the Handle method in ReadEmailTemplateQueryHandler, eliminating related compiler warnings and indicating that the method is no longer considered obsolete.
Replaces IEmailTemplateRepository with IRepository<EmailTemplate> in ReadEmailTemplateQueryHandler. Updates method logic to use LINQ queries and FirstOrDefaultAsync. Cleans up obsolete attributes, comments, and using directives. Renames cancellation token parameter for consistency.
Replaced ReadEmailTemplateResponse with EmailTemplateDto as the standard DTO for email templates. Updated ReadEmailTemplateQuery and its handler to use EmailTemplateDto. Removed the obsolete MappingProfile and cleaned up EmailTemplateDto with improved documentation. Simplified UpdateEmailTemplateCommandHandler by removing conditional updates for Body and Subject. These changes streamline DTO usage and reduce redundancy in email template handling.
Removed ApiExplorerSettings attribute. Changed Body and Subject to nullable strings with init accessors and updated their documentation. Added AddedWhen and ChangedWhen timestamp properties to track template creation and modification dates. Cleaned up property formatting.
Refactored by moving ReadEmailTemplateQueryHandler and its implementation into ReadEmailTemplateQuery.cs. Updated using directives accordingly. Deleted the now-redundant ReadEmailTemplateQueryHandler.cs file. No logic changes were made. This consolidates related query and handler code for better maintainability.
- Enforce [Authorize(Policy = AuthPolicy.Sender)] on controller
- Switch to primary constructor for dependency injection
- Remove obsolete constructor and private fields
- Update method logic to use constructor parameters directly
- Improve XML documentation and code clarity
- Ensure consistent use of MediatR for command/query handling