Microsoft 开发人员网络 > 论坛主页 > LINQ Project General > LINQ to SQL designer VWD Express 2008 Beta 2
提出问题提出问题
 

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

  • 2007年10月10日 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

答案

全部回复

  • 2007年10月11日 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

  • 2007年10月13日 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