Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Learning Microsoft Azure
  • Table Of Contents Toc
Learning Microsoft Azure

Learning Microsoft Azure

By : Geoff Webber Cross
4.1 (7)
close
close
Learning Microsoft Azure

Learning Microsoft Azure

4.1 (7)
By: Geoff Webber Cross

Overview of this book

If you are a developer interested in building systems for Microsoft Azure, with an understanding of efficient cloud-based application development, then this is the book for you.
Table of Contents (14 chapters)
close
close
13
Index

Creating database scripts from Entity Framework Code First Migrations

We can easily create a T-SQL script from a database built with Code First Migrations by entering the following command in the Package Manager console:

Update-Database -Script -SourceMigration:$InitialDatabase

This command creates a T-SQL script for all migrations and opens it in Visual Studio. Unfortunately, scripts aren't created for the database seeding as this isn't part of Entity Framework migrations, so this has to be scripted separately.

Once we have these scripts, system administrators or database administrators can easily use them to build databases for our application environments without Code First Migrations. Once deployed, we can create more scripts to move to the next migration.

Of course, we can always manually create database schema scripts from SQL Server Management Studio. We can also use third-party tools such as Red Gate's SQL Compare product (http://www.red-gate.com/products/sql-development...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Learning Microsoft Azure
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon