Microsoft Developer Network > Forenhomepage > LINQ Project General > LINQ to SQL designer VWD Express 2008 Beta 2
Stellen Sie eine FrageStellen Sie eine Frage
 

BeantwortetLINQ to SQL designer VWD Express 2008 Beta 2

  • Mittwoch, 10. Oktober 2007 23:31Leonchik TeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillen
     

    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

Antworten

Alle Antworten

  • Donnerstag, 11. Oktober 2007 04:36Dinesh Kulkarni - MSFT TeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillen
     Beantwortet

    Just to rule out the most obvious ...

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


    Thanks,

    Dinesh

  • Samstag, 13. Oktober 2007 02:37Wael Farag TeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillen
     
     

    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