@@ -92,6 +92,7 @@ public AdoCommandFluent CommandTimeout(int commandTimeout)
9292 public DataSet ExecuteDataSet ( ) => this . Ado . ExecuteDataSet ( this . Connection , this . Transaction , this . CmdType , this . CmdText , this . CmdTimeout , this . CmdParameters . ToArray ( ) ) ;
9393 public object [ ] [ ] ExecuteArray ( ) => this . Ado . ExecuteArray ( this . Connection , this . Transaction , this . CmdType , this . CmdText , this . CmdTimeout , this . CmdParameters . ToArray ( ) ) ;
9494 public List < T > Query < T > ( ) => this . Ado . Query < T > ( this . Connection , this . Transaction , this . CmdType , this . CmdText , this . CmdTimeout , this . CmdParameters . ToArray ( ) ) ;
95+ public T QuerySingle < T > ( ) => Query < T > ( ) . FirstOrDefault ( ) ;
9596 public NativeTuple < List < T1 > , List < T2 > > Query < T1 , T2 > ( ) => this . Ado . Query < T1 , T2 > ( this . Connection , this . Transaction , this . CmdType , this . CmdText , this . CmdTimeout , this . CmdParameters . ToArray ( ) ) ;
9697 public NativeTuple < List < T1 > , List < T2 > , List < T3 > > Query < T1 , T2 , T3 > ( ) => this . Ado . Query < T1 , T2 , T3 > ( this . Connection , this . Transaction , this . CmdType , this . CmdText , this . CmdTimeout , this . CmdParameters . ToArray ( ) ) ;
9798 public NativeTuple < List < T1 > , List < T2 > , List < T3 > , List < T4 > > Query < T1 , T2 , T3 , T4 > ( ) => this . Ado . Query < T1 , T2 , T3 , T4 > ( this . Connection , this . Transaction , this . CmdType , this . CmdText , this . CmdTimeout , this . CmdParameters . ToArray ( ) ) ;
@@ -105,6 +106,7 @@ public AdoCommandFluent CommandTimeout(int commandTimeout)
105106 public Task < DataSet > ExecuteDataSetAsync ( CancellationToken cancellationToken = default ) => this . Ado . ExecuteDataSetAsync ( this . Connection , this . Transaction , this . CmdType , this . CmdText , this . CmdTimeout , this . CmdParameters . ToArray ( ) , cancellationToken ) ;
106107 public Task < object [ ] [ ] > ExecuteArrayAsync ( CancellationToken cancellationToken = default ) => this . Ado . ExecuteArrayAsync ( this . Connection , this . Transaction , this . CmdType , this . CmdText , this . CmdTimeout , this . CmdParameters . ToArray ( ) , cancellationToken ) ;
107108 public Task < List < T > > QueryAsync < T > ( CancellationToken cancellationToken = default ) => this . Ado . QueryAsync < T > ( this . Connection , this . Transaction , this . CmdType , this . CmdText , this . CmdTimeout , this . CmdParameters . ToArray ( ) , cancellationToken ) ;
109+ async public Task < T > QuerySingleAsync < T > ( CancellationToken cancellationToken = default ) => ( await QueryAsync < T > ( cancellationToken ) ) . FirstOrDefault ( ) ;
108110 public Task < NativeTuple < List < T1 > , List < T2 > > > QueryAsync < T1 , T2 > ( CancellationToken cancellationToken = default ) => this . Ado . QueryAsync < T1 , T2 > ( this . Connection , this . Transaction , this . CmdType , this . CmdText , this . CmdTimeout , this . CmdParameters . ToArray ( ) , cancellationToken ) ;
109111 public Task < NativeTuple < List < T1 > , List < T2 > , List < T3 > > > QueryAsync < T1 , T2 , T3 > ( CancellationToken cancellationToken = default ) => this . Ado . QueryAsync < T1 , T2 , T3 > ( this . Connection , this . Transaction , this . CmdType , this . CmdText , this . CmdTimeout , this . CmdParameters . ToArray ( ) , cancellationToken ) ;
110112 public Task < NativeTuple < List < T1 > , List < T2 > , List < T3 > , List < T4 > > > QueryAsync < T1 , T2 , T3 , T4 > ( CancellationToken cancellationToken = default ) => this . Ado . QueryAsync < T1 , T2 , T3 , T4 > ( this . Connection , this . Transaction , this . CmdType , this . CmdText , this . CmdTimeout , this . CmdParameters . ToArray ( ) , cancellationToken ) ;
0 commit comments