What is the best way represent a dynamic pivot table in an entity model? RRS feed

  • General discussion

  • Hello,


    I am using wcf data services in conjunction with an entity framework model and an sql sever database backend.  I would like expose a dynamic pivot table (meaning Variable number of columns) to my silverlight client.  Right now, I have an sql stored procedure that returns the pivot table I am looking for.  However, it doesn't seem possible to create a single entity that is able to caple a dynamic pivot table (because entities seem to have to be a fixed size).  One solution I see to this problem is using multiple tables, and linking them together with foreign keys.  Another is not using the pivot stored procedure and let the data service provide a method that pivots the table.  The other solution is to pivot the table in the silverlight application (perhaps using linq?).


    Is there a better solution I don't know about?  Which one is the most preferred?




    • Changed type Jackie-Sun Monday, June 20, 2011 8:02 AM Looking for better solution
    Thursday, June 16, 2011 4:58 PM

All replies

  • Hello Eric,

    Thanks for your post.

    According to your description, I think your topic is more suitable to be a Discussion, so I will change the thread type for you.


    Have a nice day,

    Jackie Sun [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, June 20, 2011 8:01 AM