How to create datacontract which holds runtime column returning from stored procedure

161 views Asked by At

Need help defining a DataContract for a WCF Service when stored procedure returns the dynamic columns.Please see image as shown in link for better understanding my scenario Image .

In this scenario my stored procedure returns subjects(Columns) which may vary.

Please advise how to write/create data contract?

Platform - Silver light, MVVM Framework

1

There are 1 answers

0
trouta On

I needed to accomplish a similar goal, in which I needed to display a dynamic data set in a grid. To accomplish I returned a list of dictionaries.

    [OperationContract]
    public IEnumerable<Dictionary<string,string>> GetSourceDataAll(string sBatchId);