Creating Sample Data from Existing Data

    General discussion

  • So this is sort of a conceptual question, I'm looking for some advice on a creative way to solve this problem.

    My Silverlight app uses RIA services on an SQL2008 server backend. One database for all users. We have created a set of sample data and would like some way that we can duplicate that sample data for a new user.

    I know that I can hard code a routine to create this data on demand, but I'm looking for a solution that is a little more creative than that so that as we change the original sample data, that changed data is used to create the sample data for new users without having to rework the routine that creates the copies.

    The sample data exists in many tables with foreign keys, etc, so it has to be done in a way that child entities become children of the new copy of the parent entities.

    Thanks in advance,

    Thursday, January 26, 2012 3:29 PM

All replies

  • There is a library in RIA Services Contrib called EntityGraph that can do an operation across a graph of entities. You may be able to use EntityGraph to clone  a graph of entities and rekey them. If you need help ask on the contrib message boards ( and Merijn should be able to help you out.


    Monday, January 30, 2012 12:03 PM
  • Can you please provide more details? like what you exactly require.. do you need direct sample data in sql or sample data in code object..?

    Monday, January 30, 2012 12:12 PM
  • I need to duplicate the data as records in my SQL database.

    Monday, January 30, 2012 1:56 PM