Forum


HomeHomePremiumPremiumDevelopmentDevelopmentExpanding the templateExpanding the template
Previous
 
Next
New Post
9/15/2014 3:19 PM
 

Couple of quick procedural questions: 

I started with the VS 2013 C# DAL2 Template. I get the Item.cs file as part of the template. Fine, I can work with it. Now, I am changing the definitions in Item.cs and also adding additional tables and corresponding classes. Using DAL2, is there any sort of upgrade functionality, or am I hand coding the SqlDataProvider files to track update son my own? In asp.net I had been using the Entity Framework. I am fine with DAL2 but didn't want to miss out on proper procedures for migrating databases. I guess my current plan is to 

1) Create the databases in ServerManagementStudio

2) Write classes to match

3) When it is time to package up, I am going to use the SMS script tool to create scripts and hand insert those into SqlDataProvider

Is it common to use enable-migrations on DNN tables? 

Thanks

Kevin

 
New Post
9/15/2014 3:58 PM
 

I know this seems really mundane, but perhaps Scott could do a video on how to migrate databases forward between versions? 

Kevin

 
New Post
9/16/2014 3:43 AM
 

Kevin,

As far as I know, even with DAL2, you still need to create versioned sql scripts for your installation to make necessary table changes across new module versions.  I am looking into an update to my Entity Framework tutorial using version 6 because I am finding interest in developers using EF6 as their module data layer.  I hope to start that in October. 

It is possible to use T4 templates to generate DAL2 classes from the SQL table definition.  I was thinking about showing that, but found it is only useful in generating a large set of code from a large set of tables one time.  It is very difficult to use templates for incremental changes.

Not sure what you mean by "migrate databases forward between versions".  Are you referring to how to maintain a module project across new versions; ie: maintaining your manifest, versioning your assembly, sql scripts for table changes, etc?

 
New Post
9/16/2014 9:37 PM
 
Scott wrote:

Kevin,

Not sure what you mean by "migrate databases forward between versions".  Are you referring to how to maintain a module project across new versions; ie: maintaining your manifest, versioning your assembly, sql scripts for table changes, etc?

Basically, yes!  How do we maintain this things when making some changes. How to update the database (hopefully leaving existing data in place, version control for the install package. Perhaps you could take the DAL2 template through an upgrade. I know about the version number, but what about the other stuff. Best practices, etc. 

 
Previous
 
Next
HomeHomePremiumPremiumDevelopmentDevelopmentExpanding the templateExpanding the template



Try FREE
30 days money back guaranteed