예제 #1
0
 public Task <T> QuerySingleAsync <T>(string sql, object param)
 {
     return(Disposable.Using(() => this.GetOpenConnection(_readConStr), async connection => (await connection.QueryAsync <T>(sql, param)).FirstOrDefault()));
 }
예제 #2
0
 public Task <IEnumerable <T> > QueryAsync <T>(string sql, object param)
 {
     return(Disposable.UsingAsync(() => this.GetOpenConnection(_readConStr), connection => connection.QueryAsync <T>(sql, param)));
 }
예제 #3
0
 public Task <int> ExecuteAsync(string sql, object param)
 {
     return(Disposable.UsingAsync(() => this.GetOpenConnection(_conStr), connection => connection.ExecuteAsync(sql, param)));
 }