locked
Update model from database RRS feed

  • Question

  • Is there any way of updating the LightSwitch model from the database?  LightSwitch appears to be using Entity Framework underneath so it seems that it should be possible.

    TIA

    Crispin

    Tuesday, August 31, 2010 3:46 PM

Answers

  • Hi Crispin,

    As the user is updating the LS model, Visual Studio will continously update the EF model on the background.  And currently, there's no background compiler/msbuild task to do the opposite.

    If you updated your databases, and you want to update the LS model on these attached databases in your LS project; you could right click on your "DataSource" and "Update datasource".  And your changes to the LS model should remain and changes from the attached databases would be relfected in the LS model.

    thanks

    toby

    • Marked as answer by CrispinH Tuesday, August 31, 2010 7:28 PM
    Tuesday, August 31, 2010 7:13 PM

All replies

  • Hi Crispin,

    As the user is updating the LS model, Visual Studio will continously update the EF model on the background.  And currently, there's no background compiler/msbuild task to do the opposite.

    If you updated your databases, and you want to update the LS model on these attached databases in your LS project; you could right click on your "DataSource" and "Update datasource".  And your changes to the LS model should remain and changes from the attached databases would be relfected in the LS model.

    thanks

    toby

    • Marked as answer by CrispinH Tuesday, August 31, 2010 7:28 PM
    Tuesday, August 31, 2010 7:13 PM
  • Thanks Toby.  I right-clicked on a number of things, but not the Data Source itself.  That did the trick.
    Tuesday, August 31, 2010 7:31 PM