@@ -115,6 +115,14 @@ protected DatabaseAccessor(DbConnection connection, Action onDispose)
115115 . Single ( ) ;
116116 } ) ;
117117
118+ public TReturn QuerySingle < TReturn , TSecond , TThird , TFourth , TFifth , TSixth , TSeventh > ( string commandText , CommandType commandType , ParametersVisitor parameters , string splitOn ) where TReturn : new ( ) => Execute ( commandText , commandType , parameters , ( ) =>
119+ {
120+ MultiMapper multiMapper = new MultiMapper ( ) ;
121+ return this . QueryMany < TReturn , TSecond , TThird , TFourth , TFifth , TSixth , TSeventh , TReturn > ( commandText , commandType , parameters , ( a , b , c , d , e , f , g ) => multiMapper . MapRow < TReturn > ( useProjection : false , a , b , c , d , e , f , g ) , splitOn )
122+ . PostProcess ( multiMapper )
123+ . Single ( ) ;
124+ } ) ;
125+
118126 T IDatabaseAccessor . QuerySingleOrDefault < T > ( string commandText , CommandType commandType , ParametersVisitor parameters ) => Execute ( commandText , commandType , parameters , ( ) => this . QuerySingleOrDefault < T > ( commandText , commandType , parameters ) . PostProcess ( ) ) ;
119127
120128 IMultipleResultReader IDatabaseAccessor . QueryMultiple ( string commandText , CommandType commandType , ParametersVisitor parameters ) => Execute ( commandText , commandType , parameters , ( ) => this . QueryMultiple ( commandText , commandType , parameters ) ) ;
@@ -140,6 +148,7 @@ protected DatabaseAccessor(DbConnection connection, Action onDispose)
140148 protected abstract 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 ) ;
141149
142150 protected abstract 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 ) ;
151+ protected abstract 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 ) ;
143152
144153 protected abstract 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 ) ;
145154
0 commit comments