MSDN > 論壇首頁 > LINQ Project General > LINQ to SQL designer VWD Express 2008 Beta 2
發問發問
 

已答覆LINQ to SQL designer VWD Express 2008 Beta 2

  • Wednesday, 10 October, 2007 23:31Leonchik 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     

    When I add a table or class to the O\R designer for LINQ to SQL classes, the designer.vb does not automatically generate any objects.  In fact it is completely blank.  I don't know if there is some setting I have to enable or what the deal is.  I have uninstalled, reinstalled and repaired it and still the same issue.  I did have Orcas Beta 1 installed prior and I uninstalled it before installing the Beta 2. Could something still linger around from the Beta 1 interfering with Beta 2?  Any suggestions?

     

    Thanks

解答

所有回覆

  • Thursday, 11 October, 2007 4:36Dinesh Kulkarni - MSFT 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     已答覆

    Just to rule out the most obvious ...

    You are saving after drag and drop before looking at the .vb/.cs file, right?


    Thanks,

    Dinesh

  • Saturday, 13 October, 2007 2:37Wael Farag 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
     

    There is a bug in VWD 2008 Beta 2, that is the O/R Designer does not regenerate the mapping code, after the first generation, if you change the dbml file. It seems laking the trigger to regenerate!!!

     

    I found a walk arround to force the Designer to re-generate the mapped code- till the RTM bug fix appears:

    1. Make your changes to the dbml file (add, delete entities, or change properties) and save the file
    2. Rename the file (ex. Northwind.dbml to Northwind2.dbml)
    3. Make a copy in the same place (Drag to the same folder + CTRL)
    4. The file will be copied to (Copy of Northwind2.dbml)
    5. Rename the copied file to the original name. At this point I found that the Designer starts to Regenerate the .cs file and if you open it you will find your changes
    6. Finally delete the first file (Northwind2.dbml)

    The nice thing in this method is that: I do not need to delete and create all the tables again.

    Hopfully this method will solve the problem