public Task <T> GetAsync <T>(int id) where T : class { if (CurrentTransaction != null) { return(DbExecProxyAsync <T>((param) => CurrentConnection.GetAsync <T>(id, CurrentTransaction, CommandTimeout), "get by id", null)); } using var connection = GetDbConnection(DataSourceEnum.SLAVE); return(DbExecProxyAsync <T>((param) => connection.GetAsync <T>(id, CurrentTransaction, CommandTimeout), "get by id", null)); }