Wednesday, December 12, 2012

Windows Azure (Part 1) Migrator Dotnet

I like to use Migrator Dotnet in my projects to manage database changes during development.  I know EF has it's own migration engine and I really should use it, however I just like Migrator Dotnet better.

One thing I was worried about when I was moving a site over to Azure Websites, and Sql Azure, was how to manage database changes.  I new Windows Azure supported Entity Framework Migrations, but the project I was moving over was a little older and I was using Migrator Dotnet.

So I created my new SQL Azure Database, and allowed my IP address to connect to the database using the Azure Management Portal.  Then I was able to connect to the database from my development workstation using SQL Management Studio.  I figured if I could connect that way, I should be able to run my Migrations from my development workstation using the connection string to my Azure database.

I setup my migration script with the proper connection string and I ran my migrations.  After a couple minutes, all my migrations were completed successfully and my Azure database was filled with all my tables and seed data.

I was excited that it worked.  I really did not want to spend time switching over to using Entity Framework Migrations.

Windows Azure (Intro)

I recently signed up for a free Windows Azure account to learn more about the cloud offering from Microsoft.

Windows Azure is a Microsoft product.  Described below by Wikiepedia.
cloud computing platform used to build, deploy and manage applications through a global network of Microsoft-managed datacenters. Windows Azure allows for applications to be built using many different programming languages, tools or frameworks and makes it possible for developers to integrate their public cloud applications in their existing IT environment. Windows Azure provides both Platform as a Service (PaaS) and Infrastructure as a Service (IaaS) services and is classified as the “Public Cloud” in Microsoft's cloud computing strategy, along with its Software as a Service (SaaS) offering, Microsoft Online Services

 So I have been reading online about how easy it is to setup your websites and data driven web applications and I thought I would give it a try.

I am not going to blog about How to publish a site or signup or anything like that.  There are already lots of blogs posts like that.  What I will blog about are some things I was able to do that aren't really talked about anywhere else.

My first azure blog post will be Migrator Dotnet and Azure.