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