I have this call:
public IObservable<T> Subscribe(object topic, string service, string connectionString, string query) { try { this.connection.ConnectionString = connectionString; this.connection.Open(); this.connection.Query<T>(query, new { transactionid = topic }).ToObservable().Subscribe(message => this.subject.OnNext(message)); return this.subject; } catch (Exception e) { this.subject.OnError(e); return this.subject; } finally { this.subject.OnCompleted(); this.connection.Close(); } }
This is my query:
with IDS as (select L1_ID, L2_ID, L1_VALUE, L2_VALUE from MYDB where MYDB.ID = :transactionid) select * from (select L1_ID as ID, round(L1_VALUE, 28) as VALUE from IDS union select L2_ID as ID, round(L2_VALUE, 28) as VALUE from IDS) UN
This throw this error:
A parameterless default constructor or one matching signature (System.String ID, System.Decimal VALUE) is required for System.Tuple
2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Nullable
1[[System.Decimal, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] materialization