@@ -27,12 +27,12 @@ public DapperDatabaseAccessor(DbConnection connection = null, IDbTransaction def
2727 #endregion
2828
2929 #region Overrides
30- protected override int Execute ( string commandText , CommandType commandType , int ? commandTimeout , ParametersVisitor parameters )
30+ protected override int Execute ( string commandText , CommandType commandType , ParametersVisitor parameters , int ? commandTimeout )
3131 {
3232 return base . Connection . Execute ( commandText , CollectParameters ( parameters ) , _defaultTransaction , commandTimeout ?? _defaultCommandTimeout , commandType ) ;
3333 }
3434
35- protected override Task < int > ExecuteAsync ( string commandText , CommandType commandType , int ? commandTimeout , ParametersVisitor parameters , CancellationToken cancellationToken )
35+ protected override Task < int > ExecuteAsync ( string commandText , CommandType commandType , ParametersVisitor parameters , int ? commandTimeout , CancellationToken cancellationToken )
3636 {
3737 CommandDefinition command = new CommandDefinition ( commandText , CollectParameters ( parameters ) , _defaultTransaction , commandTimeout ?? _defaultCommandTimeout , commandType , cancellationToken : cancellationToken ) ;
3838 return base . Connection . ExecuteAsync ( command ) ;
@@ -52,64 +52,10 @@ protected override Task<IEnumerable<T>> QueryManyAsync<T>(string commandText, Co
5252 return base . Connection . QueryAsync < T > ( command ) ;
5353 }
5454
55- protected override IEnumerable < TReturn > QueryMany < TFirst , TSecond , TReturn > ( string commandText , CommandType commandType , ParametersVisitor parameters , Func < TFirst , TSecond , TReturn > map , string splitOn )
55+ protected override IEnumerable < TReturn > QueryMany < TReturn > ( string commandText , CommandType commandType , ParametersVisitor parameters , Type [ ] types , Func < object [ ] , TReturn > map , string splitOn )
5656 {
57- DecoratedTypeMap . Adapt < TFirst , TSecond > ( ) ;
58- return base . Connection . Query ( commandText , map , CollectParameters ( parameters ) , _defaultTransaction , commandType : commandType , commandTimeout : _defaultCommandTimeout , splitOn : splitOn ) ;
59- }
60-
61- protected override IEnumerable < TReturn > QueryMany < TFirst , TSecond , TThird , TReturn > ( string commandText , CommandType commandType , ParametersVisitor parameters , Func < TFirst , TSecond , TThird , TReturn > map , string splitOn )
62- {
63- DecoratedTypeMap . Adapt < TFirst , TSecond , TThird > ( ) ;
64- return base . Connection . Query ( commandText , map , CollectParameters ( parameters ) , _defaultTransaction , commandType : commandType , commandTimeout : _defaultCommandTimeout , splitOn : splitOn ) ;
65- }
66-
67- protected override IEnumerable < TReturn > QueryMany < TFirst , TSecond , TThird , TFourth , TReturn > ( string commandText , CommandType commandType , ParametersVisitor parameters , Func < TFirst , TSecond , TThird , TFourth , TReturn > map , string splitOn )
68- {
69- DecoratedTypeMap . Adapt < TFirst , TSecond , TThird , TFourth > ( ) ;
70- return base . Connection . Query ( commandText , map , CollectParameters ( parameters ) , _defaultTransaction , commandType : commandType , commandTimeout : _defaultCommandTimeout , splitOn : splitOn ) ;
71- }
72-
73- protected override IEnumerable < TReturn > QueryMany < TFirst , TSecond , TThird , TFourth , TFifth , TReturn > ( string commandText , CommandType commandType , ParametersVisitor parameters , Func < TFirst , TSecond , TThird , TFourth , TFifth , TReturn > map , string splitOn )
74- {
75- DecoratedTypeMap . Adapt < TFirst , TSecond , TThird , TFourth , TFifth > ( ) ;
76- return base . Connection . Query ( commandText , map , CollectParameters ( parameters ) , _defaultTransaction , commandType : commandType , commandTimeout : _defaultCommandTimeout , splitOn : splitOn ) ;
77- }
78-
79- protected override IEnumerable < TReturn > QueryMany < TFirst , TSecond , TThird , TFourth , TFifth , TSixth , TReturn > ( string commandText , CommandType commandType , ParametersVisitor parameters , Func < TFirst , TSecond , TThird , TFourth , TFifth , TSixth , TReturn > map , string splitOn )
80- {
81- DecoratedTypeMap . Adapt < TFirst , TSecond , TThird , TFourth , TFifth , TSixth > ( ) ;
82- return base . Connection . Query ( commandText , map , CollectParameters ( parameters ) , _defaultTransaction , commandType : commandType , commandTimeout : _defaultCommandTimeout , splitOn : splitOn ) ;
83- }
84-
85- protected override IEnumerable < TReturn > QueryMany < TFirst , TSecond , TThird , TFourth , TFifth , TSixth , TSeventh , TReturn > ( string commandText , CommandType commandType , ParametersVisitor parameters , Func < TFirst , TSecond , TThird , TFourth , TFifth , TSixth , TSeventh , TReturn > map , string splitOn )
86- {
87- DecoratedTypeMap . Adapt < TFirst , TSecond , TThird , TFourth , TFifth , TSixth , TSeventh > ( ) ;
88- return base . Connection . Query ( commandText , map , CollectParameters ( parameters ) , _defaultTransaction , commandType : commandType , commandTimeout : _defaultCommandTimeout , splitOn : splitOn ) ;
89- }
90-
91- protected override IEnumerable < TReturn > QueryMany < TFirst , TSecond , TThird , TFourth , TFifth , TSixth , TSeventh , TEighth , TReturn > ( string commandText , CommandType commandType , ParametersVisitor parameters , Func < TFirst , TSecond , TThird , TFourth , TFifth , TSixth , TSeventh , TEighth , TReturn > map , string splitOn )
92- {
93- DecoratedTypeMap . Adapt < TFirst , TSecond , TThird , TFourth , TFifth , TSixth , TSeventh , TEighth > ( ) ;
94- Type [ ] types = { typeof ( TFirst ) , typeof ( TSecond ) , typeof ( TThird ) , typeof ( TFourth ) , typeof ( TFifth ) , typeof ( TSixth ) , typeof ( TSeventh ) , typeof ( TEighth ) } ;
95- Func < object [ ] , TReturn > mapWrapper = x => map ( ( TFirst ) x [ 0 ] , ( TSecond ) x [ 1 ] , ( TThird ) x [ 2 ] , ( TFourth ) x [ 3 ] , ( TFifth ) x [ 4 ] , ( TSixth ) x [ 5 ] , ( TSeventh ) x [ 6 ] , ( TEighth ) x [ 7 ] ) ;
96- return base . Connection . Query ( commandText , types , mapWrapper , CollectParameters ( parameters ) , _defaultTransaction , commandType : commandType , commandTimeout : _defaultCommandTimeout , splitOn : splitOn ) ;
97- }
98-
99- protected override IEnumerable < TReturn > QueryMany < TFirst , TSecond , TThird , TFourth , TFifth , TSixth , TSeventh , TEighth , TNinth , TReturn > ( string commandText , CommandType commandType , ParametersVisitor parameters , Func < TFirst , TSecond , TThird , TFourth , TFifth , TSixth , TSeventh , TEighth , TNinth , TReturn > map , string splitOn )
100- {
101- DecoratedTypeMap . Adapt < TFirst , TSecond , TThird , TFourth , TFifth , TSixth , TSeventh , TEighth , TNinth > ( ) ;
102- Type [ ] types = { typeof ( TFirst ) , typeof ( TSecond ) , typeof ( TThird ) , typeof ( TFourth ) , typeof ( TFifth ) , typeof ( TSixth ) , typeof ( TSeventh ) , typeof ( TEighth ) , typeof ( TNinth ) } ;
103- Func < object [ ] , TReturn > mapWrapper = x => map ( ( TFirst ) x [ 0 ] , ( TSecond ) x [ 1 ] , ( TThird ) x [ 2 ] , ( TFourth ) x [ 3 ] , ( TFifth ) x [ 4 ] , ( TSixth ) x [ 5 ] , ( TSeventh ) x [ 6 ] , ( TEighth ) x [ 7 ] , ( TNinth ) x [ 8 ] ) ;
104- return base . Connection . Query ( commandText , types , mapWrapper , CollectParameters ( parameters ) , _defaultTransaction , commandType : commandType , commandTimeout : _defaultCommandTimeout , splitOn : splitOn ) ;
105- }
106-
107- protected override IEnumerable < TReturn > QueryMany < TFirst , TSecond , TThird , TFourth , TFifth , TSixth , TSeventh , TEighth , TNinth , TTenth , TEleventh , TReturn > ( string commandText , CommandType commandType , ParametersVisitor parameters , Func < TFirst , TSecond , TThird , TFourth , TFifth , TSixth , TSeventh , TEighth , TNinth , TTenth , TEleventh , TReturn > map , string splitOn )
108- {
109- DecoratedTypeMap . Adapt < TFirst , TSecond , TThird , TFourth , TFifth , TSixth , TSeventh , TEighth , TNinth , TTenth , TEleventh > ( ) ;
110- Type [ ] types = { typeof ( TFirst ) , typeof ( TSecond ) , typeof ( TThird ) , typeof ( TFourth ) , typeof ( TFifth ) , typeof ( TSixth ) , typeof ( TSeventh ) , typeof ( TEighth ) , typeof ( TNinth ) , typeof ( TTenth ) , typeof ( TEleventh ) } ;
111- Func < object [ ] , TReturn > mapWrapper = x => map ( ( TFirst ) x [ 0 ] , ( TSecond ) x [ 1 ] , ( TThird ) x [ 2 ] , ( TFourth ) x [ 3 ] , ( TFifth ) x [ 4 ] , ( TSixth ) x [ 5 ] , ( TSeventh ) x [ 6 ] , ( TEighth ) x [ 7 ] , ( TNinth ) x [ 8 ] , ( TTenth ) x [ 9 ] , ( TEleventh ) x [ 10 ] ) ;
112- return base . Connection . Query ( commandText , types , mapWrapper , CollectParameters ( parameters ) , _defaultTransaction , commandType : commandType , commandTimeout : _defaultCommandTimeout , splitOn : splitOn ) ;
57+ DecoratedTypeMap . Adapt ( types ) ;
58+ return base . Connection . Query ( commandText , types , map , CollectParameters ( parameters ) , _defaultTransaction , commandType : commandType , commandTimeout : _defaultCommandTimeout , splitOn : splitOn ) ;
11359 }
11460
11561 protected override T QuerySingle < T > ( string commandText , CommandType commandType , ParametersVisitor parameters )
0 commit comments