none
Adding new table from entity RRS feed

  • Question

  • Hi,

    I have started using my last year's solution on a new machine with slightly different database.  I have changed the connection, but few tables that exist in my entity model are absent in my new database. 

    My question is it possible to create table in the underline database from the Entity model/designer.  I've tried "Generate Database from Model", but then saw in the DLL script that it does drops all the tables and re-creates them all.  If that is the case then it will delete the contents from those tables that I already have - and for obvious reasons I don't want to do that.

    Or should I create them manually and then  Refresh the Model?

    Thanks

    Wednesday, July 9, 2014 2:39 PM

Answers

  • Hello,

    >>Or should I create them manually and then Refresh the Model?

    Both are ok. If you use “Generate Database from Model”, do not need to execute the generated script and you could just copy the script for creating new tables and execute them.

    The way to create them manually and refresh the model is more used, it is simpler.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, July 10, 2014 3:08 AM
    Moderator

All replies

  • Hello,

    >>Or should I create them manually and then Refresh the Model?

    Both are ok. If you use “Generate Database from Model”, do not need to execute the generated script and you could just copy the script for creating new tables and execute them.

    The way to create them manually and refresh the model is more used, it is simpler.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, July 10, 2014 3:08 AM
    Moderator
  • Thank you Fred,

    I tried to edit the script, but for some reason couldn't.  I could only highlight/select.  But as you've suggested probably simpler to create the tables manually in SQL Server and then Refresh it.  I just thought if there were a magical and simple tool that I wasn't aware of.

    Thanks

    Thursday, July 10, 2014 11:01 AM