开发者

how to read csdl,ssdl,msl in run time and how to Upgrade Tables from edmx file

开发者 https://www.devze.com 2023-02-09 04:50 出处:网络
how to read csdl,ssdl,msl in run time. and if we change a schema then how to upgrade tables i.e. if we have edmx(in one table lets Employee etc.) then database wizar开发者_C百科d generate a script of

how to read csdl,ssdl,msl in run time. and if we change a schema then how to upgrade tables i.e. if we have edmx(in one table lets Employee etc.) then database wizar开发者_C百科d generate a script of create employee. if we modify the edmx and add a one table(like Account etc.) and alter a employee table(i.e remove a coloum).what edmx will generate a alter and create script.


Default database script generation can only create script for new database. Fortunatelly this feature can be modified. Database script generation is handled by Workflow or T4 template. You can build your own and define any logic you demand.

Visual Studio Extension manager already offers Entity Designer Database Generation Power Pack which provides several new workflows and T4 templates for DB generation including "Generate Migration TSQL and Deploy" workflow. This worklfow should use VS 2010 Premium (and Ultimate) DB features to compare current DB with newly generated script, create diff script and deploy it. I personally do not use these automatic features. I always generate diff script manually (with help of VS or RedGate tools).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号