Injected IMemoryCache into ReadDefaultConfigQueryHandler and updated the Handle method to cache the default configuration for 30 minutes. This reduces database queries and improves performance for frequently accessed configuration data.
Added EnforceSingleResult to ReadDefaultConfigQuery to allow strict single-result enforcement. Updated handler logic to use SingleOrDefaultAsync when requested. Replaced InvalidOperationException with NotFoundException and improved error messaging when no configuration is found.
Introduced ReadDefaultConfigQuery and its handler to retrieve the application's default configuration using MediatR. The handler fetches the first Config entity from the repository, maps it to ConfigDto, and throws an exception if no configuration is found.