Silverlight and dbml and svc. can only have 1 table in dbml otherwise it times out

Last post 07-06-2009 12:43 AM by Wencui Qian - MSFT. 2 replies.

Sort Posts:

  • Silverlight and dbml and svc. can only have 1 table in dbml otherwise it times out

    07-03-2009, 10:59 AM
    • Member
      169 point Member
    • Bexm
    • Member since 08-08-2005, 11:06 AM
    • UK
    • Posts 69

     I have a silverlight project within my solution that has 2 xaml files.

    There is also a service reference to an .svc in my website.

    My service has one function:

      string con = ConfigurationManager.ConnectionStrings["conn"].ToString();
         
            SilverlightDataDataContext db = new SilverlightDataDataContext(con);
            var mTemplates = from MediaTemplate in db.MediaTemplates where MediaTemplate.webId == webId select MediaTemplate;
            
            return mTemplates.ToList();

    this is called from the xaml.cs file.

    When the dbml file has one table, all works fine and the data is bought back to the silverlight.

    If we add another table, be it to the existing dbml or completely recreate another dbml it doesn't work.

    I can debug thru the web service and it appears to work, but it never gets back to the silverlight, it throws a time out error.

    If you delete the second table it works again.

    What on earth is going on? has anyone experienced anything like this?

    Thanks

    Bex

     

  • Re: Silverlight and dbml and svc. can only have 1 table in dbml otherwise it times out

    07-04-2009, 5:08 AM
    Answer
    • Contributor
      5,226 point Contributor
    • RickNZ
    • Member since 01-01-2009, 8:43 AM
    • Nelson, New Zealand
    • Posts 872

    Do the tables by any chance have a relationship between them?


  • Re: Silverlight and dbml and svc. can only have 1 table in dbml otherwise it times out

    07-06-2009, 12:43 AM
    Answer

    Hi Bexm,

    As RickNZ suggested, is there any problem with the second table? It seems strange that it doesn't work if you just add the second table. My suggestion is similar with RickNZ's, which is to check whether there's any relationship in second table first. Then you could add a new fresh table for test. If it still doesn't work, please show us the exact error message.

    Thanks.

    David Qian
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Page 1 of 1 (3 items)