Optimized code

This commit is contained in:
sunkaixuan
2023-10-26 20:15:20 +08:00
parent a29e4b9699
commit 6f09b884c1

View File

@@ -618,7 +618,7 @@ namespace SqlSugar
internal static Type GetCustomTypeByClass(string className) internal static Type GetCustomTypeByClass(string className)
{ {
Type type = null; Type type = null;
foreach (var item in CustomDlls.AsEnumerable()) foreach (var item in CustomDlls.ToArray())
{ {
if (type == null) if (type == null)
{ {
@@ -673,7 +673,7 @@ namespace SqlSugar
internal static Type GetCustomTypeByClass<T>(string className) internal static Type GetCustomTypeByClass<T>(string className)
{ {
Type type = null; Type type = null;
foreach (var item in CustomDlls.AsEnumerable()) foreach (var item in CustomDlls.ToArray())
{ {
if (type == null) if (type == null)
{ {