This is a continued post by my last post “My First Windows Azure Development project”. I decided to develop a light-weight prediction league application based on my life-long database development project – TeamDB. Of obvious reasons, I will not publish all functinality in these blog posts, but these posts will contain most of the details for my “PLTippen” project that shall be hosted on Windows Azure with web site and SQL database.
The first task is to swap the initial SQL Server Express version of the Membership tables that is used in the default project when creating the MVC4 web application. User the section <connectionStrings> the key “DefaultConnection” is referring to the local express database…I want to change this to standard SQL Server 2012 to ease the maintenance.
- Create a new database ‘PLTippenAzure’
- Locate the web.config in my VS2012 application
- Find the key “DefaultConnection”
- Replace the connection string with “Data Source=(Local);Initial Catalog=PLTippenAzure;Integrated Security=SSPI;”
- Save all, Clean, rebuild all
- Run the application in VS2012
- Register a new user
- Quit the application
Meanwhile, I have create a simplyfied version of the database model for this prediction application based on my TeamDB database. The database model is created in Microsoft Visio and using the plugin descibed in this post to generate the database schema for my application. This plugin helps you with creating a good database model, and it is recommended to use identity for primary keys.
After generating the database script through the “Forward Engineer” plugin, you can run the script against you database, before running the web application again. Now you have a database with Membership tables and custom tables for your application.
Any comments appreciated….Happy coding