diff --git a/src/core/DigitalData.MessagingService.Application/DependencyInjection/DependencyInjection.cs b/src/core/DigitalData.MessagingService.Application/DependencyInjection/DependencyInjection.cs index 74af05c..a064907 100644 --- a/src/core/DigitalData.MessagingService.Application/DependencyInjection/DependencyInjection.cs +++ b/src/core/DigitalData.MessagingService.Application/DependencyInjection/DependencyInjection.cs @@ -10,7 +10,7 @@ namespace DigitalData.MessagingService.Application.DependencyInjection; /// public static class DependencyInjection { - public static IServiceCollection AddMessagingServiceApplication(this IServiceCollection services, string luckyPennySoftLicenseKey) + public static IServiceCollection AddMessagingServiceApplication(this IServiceCollection services, string? luckyPennySoftLicenseKey = null) { var assembly = Assembly.GetExecutingAssembly(); @@ -24,7 +24,8 @@ public static class DependencyInjection // AutoMapper - Use built-in DI extension (AutoMapper 16.2.0+) services.AddAutoMapper(config => { - config.LicenseKey = luckyPennySoftLicenseKey; + if (luckyPennySoftLicenseKey is not null) + config.LicenseKey = luckyPennySoftLicenseKey; config.AddMaps(assembly); });