Page 1 of 1
How to easily generate database creation/deployment code
Posted: Wed 31 Oct 2012 06:04
by Jaans
Hi all
We are using LinqConnect for Silverlight (targetting SqlLite).
We need to be able to create the database on the client (in either isolated storage or local disk when installed out of browser). How could I generate the code to recreate the database from our entity developer model?
Thanks,
Jaans
Re: How to easily generate database creation/deployment code
Posted: Wed 31 Oct 2012 12:48
by MariiaI
There are several ways to create database from the model:
1) To synchronize your model and database use 'Update Database From Model' wizard (by right-clicking on the Model Designer area).
JIC: this variant can not be used in runtime.
2) To generate script for creating new database objects from your model use 'Generate Database Script From Model' wizard (by right-clicking on the Model Designer area).
When using these wizards, select the 'Regenerate Storage' option if you want to clear and rebuilt your storage part and model mapping.
For more information about these two approaches, please refer to the corresponding article in the Entity Developer documentation:
Common Concepts->Design Approaches->Updating Database From Model
3) Use of dynamic database creation via the DataContext.CreateDatabase method.
Please refer to:
http://www.devart.com/linqconnect/docs/DDL.html
http://www.devart.com/linqconnect/docs/ ... abase.html
Please tell us if this helps.