@@ -199,13 +199,18 @@ private bool IsSimpleParam(Type paramType)
199199 {
200200 return false ;
201201 }
202+ if ( SqlParameterType . SqlParameterCollection == paramType )
203+ {
204+ return false ;
205+ }
202206 if ( paramType . IsValueType ) { return true ; }
203207 if ( paramType == typeof ( string ) ) { return true ; }
204208 if ( paramType . IsGenericParameter ) { return true ; }
209+
205210 return DataType . Enumerable . IsAssignableFrom ( paramType ) ;
206211 }
207212 #region Pre
208- private string PreScoe ( Type interfaceType , string scope = "" )
213+ private string PreScope ( Type interfaceType , string scope = "" )
209214 {
210215 var sqlmapAttr = interfaceType . GetCustomAttribute < SqlMapAttribute > ( ) ;
211216 if ( sqlmapAttr != null && ! string . IsNullOrEmpty ( sqlmapAttr . Scope ) )
@@ -437,7 +442,7 @@ public Type Build(Type interfaceType, SmartSqlConfig smartSqlConfig, string scop
437442 typeBuilder . AddInterfaceImplementation ( interfaceType ) ;
438443 var sqlMapperField = typeBuilder . DefineField ( "sqlMapper" , ISqlMapperType . Type , FieldAttributes . Family ) ;
439444 var scopeField = typeBuilder . DefineField ( "scope" , CommonType . String , FieldAttributes . Family ) ;
440- scope = PreScoe ( interfaceType , scope ) ;
445+ scope = PreScope ( interfaceType , scope ) ;
441446 EmitBuildCtor ( scope , typeBuilder , sqlMapperField , scopeField ) ;
442447 var interfaceMethods = new List < MethodInfo > ( ) ;
443448
0 commit comments