visual studio 2013 - Code First Migrations, Database Projects, and SQL Azure -
we in process of developing new site plan host on azure. none of have done before, has raised interesting challenges.
first, using code first , using migrations update database. having issues figuring out how deploy database azure, ended creating database project.
there bunch of azure specific issues deployment, , errors if don't rectify valid sql azure doesn't allow use. seemed me should able code first on azure site did on local site, , found this article seems address issue.
what wondering though, best practices.
i assume don't need database projects anymore, not sure that. best practice managing databases visual studio 2013 , code first.
the approach in article above seems fine system in pre-production, once system in production , has live data, recommended approach? how protect mistakes accidentally changing setting tells visual studio recreate database?
any thoughts or ideas appreciated.
first state understanding, when using entity framework , have enabled migration, it's meant development , recommended set false when deploying code.
as deploying microsoft azure, have done using visual studio team services. thing code-first have no sql queries , database not deployed right away. here have done in past,
create blank sql query in sql management studio
in visual studio server explorer expand database project table level
right click on each table , select "show table definition" wish @ database level.
copy , past t-sql blank sql file in sql management studio. note table queries can fit in 1 file, have follow t-sql rules. connect azure database instance using sql management studio.
run sql query against database on azure. note sample data had used in developemnt not on azure database @ moment, have create insert t-sql , run against azure database.
also make sure app has right connection string when deploying microsoft azure , should connect database fine.
Comments
Post a Comment