diff --git a/src/RepoM.Api/Plugins/SimpleInjector/PackageExtensions.cs b/src/RepoM.Api/Plugins/SimpleInjector/PackageExtensions.cs index 37d992dc..10da2567 100644 --- a/src/RepoM.Api/Plugins/SimpleInjector/PackageExtensions.cs +++ b/src/RepoM.Api/Plugins/SimpleInjector/PackageExtensions.cs @@ -115,7 +115,7 @@ private static IEnumerable GetExportedTypesFrom(Assembly assembly) private static void RequiresPackageTypesHaveDefaultConstructor(Type[] packageTypes) { - var invalidPackageType = packageTypes.FirstOrDefault(type => !type.HasDefaultConstructor()); + Type? invalidPackageType = Array.Find(packageTypes, type => !type.HasDefaultConstructor()); if (invalidPackageType != null) {